Intersango/API: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
=== Data API === | |||
currency_pair_id is an optional GET parameter to all data api calls | currency_pair_id is an optional GET parameter to all data api calls | ||
* 1 = BTC:GBP | * 1 = BTC:GBP | ||
Line 8: | Line 10: | ||
* https://intersango.com/api/trades.php | * https://intersango.com/api/trades.php | ||
* https://intersango.com/api/depth.php | * https://intersango.com/api/depth.php | ||
=== Authenticated API === | |||
== Version 0.1 == | |||
All API calls are POST and must include the api key as api_key | |||
https://intersango.com/api/authenticated/v0.1/ | |||
All return values are json encoded. All decimal values are sent as strings. | |||
On error a json dictionary will be returned with 'error' set to the error. | |||
Example {'error':'missing api key'} | |||
{| class="wikitable" | |||
|- | |||
! Relative URL !! Description !! Parameters !! Return Values | |||
|---- | |||
|listAccounts.php | |||
|Accounts. | |||
|No parameters. | |||
|array of accounts | |||
*id | |||
*balance | |||
*outstanding_total | |||
*currency_abbreviation | |||
*currency_id | |||
*reference_code | |||
|---- | |||
|listOrders.php | |||
|List orders for an account. | |||
|account_id | |||
|array of orders | |||
*id | |||
*selling | |||
*rate | |||
*quantity | |||
*outstanding | |||
*base_account_id | |||
*quote_account_id | |||
*currency_pair_id | |||
*fulfilled | |||
*placed | |||
*processed | |||
*expire | |||
*cancelled | |||
*partial | |||
*immediate | |||
|---- | |||
|listDeposits.php | |||
|Deposits for an account | |||
|account_id | |||
|array of deposits | |||
*account_id | |||
*amount | |||
*deposit_id | |||
|---- | |||
|listWithdrawalRequests.php | |||
|Withdraws for an account. | |||
|account_id | |||
|array of withdrawal request | |||
|---- | |||
|placeLimitOrder.php | |||
|Place limit order. | |||
| | |||
* quantity | |||
* rate | |||
* selling "true" or "false" | |||
* base_account_id | |||
* quote_account_id | |||
| order_id | |||
|---- | |||
|requestCancelOrder.php | |||
|Request that an order be cancelled. | |||
Orders are not guaranteed to have been cancelled<br> | |||
until the cancelled property of the order is the time it was cancelled. | |||
|account_id order_id | |||
|dict with 'result' set to 'success' |
Revision as of 00:55, 15 September 2011
Data API
currency_pair_id is an optional GET parameter to all data api calls
- 1 = BTC:GBP
- 2 = BTC:EUR
- 3 = BTC:USD
- 4 = BTC:PLN
- https://intersango.com/api/ticker.php
- https://intersango.com/api/trades.php
- https://intersango.com/api/depth.php
Authenticated API
Version 0.1
All API calls are POST and must include the api key as api_key
https://intersango.com/api/authenticated/v0.1/
All return values are json encoded. All decimal values are sent as strings.
On error a json dictionary will be returned with 'error' set to the error.
Example {'error':'missing api key'}
Relative URL | Description | Parameters | Return Values |
---|---|---|---|
listAccounts.php | Accounts. | No parameters. | array of accounts
|
listOrders.php | List orders for an account. | account_id | array of orders
|
listDeposits.php | Deposits for an account | account_id | array of deposits
|
listWithdrawalRequests.php | Withdraws for an account. | account_id | array of withdrawal request |
placeLimitOrder.php | Place limit order. |
|
order_id |
requestCancelOrder.php | Request that an order be cancelled.
Orders are not guaranteed to have been cancelled |
account_id order_id | dict with 'result' set to 'success' |