Account
In the account section you can manage the accounts on the exchanges (order destinations).
Get accounts GET
Code samples
curl --request GET \
--url https://ems-mgmt.coinapi.io/v1/accounts \
--header 'Accept: application/json' \
--header 'X-CoinAPI-Key: API_KEY'
GET /v1/accounts
Get all accounts maintained for your subscription in the EMS API.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
filter_exchange_id | query | array[string] | false | Exchange id of the specific account to provide single account instead of the list of all accounts |
Example responses
200 Response
[
{
"exchange_id": "string",
"parameters": [
{
"key": "PublicApiKey",
"value": "36279b02-d24f-40be-a61b-e9fd7de46dd6"
}
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK (opens in a new tab) | OK | Inline |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
» exchange_id | string | false | Exchange identifier and optional tag identifying specific account configured when the software will be managing multiple accounts on the same exchange; for eg: BITSTAMP BITSTAMP/7c177641-74bd-4dbe-9b01-2497c12a5f70` BITSTAMP/2574 Allowed separators between the exchange identifier and the tag: ~/.,:;!@#$%^&*-_+=. |
» parameters | [KeyValue] | false | Exchange specific configuration parameters |
»» key | string | false | No description |
»» value | string | false | No description |
Add or update account POST
Code samples
curl --request POST \
--url https://ems-mgmt.coinapi.io/v1/accounts \
--header 'Content-Type: application/json' \
--header 'X-CoinAPI-Key: API_KEY' \
--data '{"exchange_id":"string","parameters":[{"key":"PublicApiKey","value":"36279b02-d24f-40be-a61b-e9fd7de46dd6"}]}'
POST /v1/accounts
Add new or update existing exchange account for your subscription in the EMS API.
Body parameter
{
"exchange_id": "string",
"parameters": [
{
"key": "PublicApiKey",
"value": "36279b02-d24f-40be-a61b-e9fd7de46dd6"
}
]
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AccountData | true | Exchange account object that needs to be add/update to the EMS |
» exchange_id | body | string | false | Exchange identifier and optional tag identifying specific account configured when the software will be managing multiple accounts on the same exchange; for eg: |
» parameters | body | [KeyValue] | false | Parameters required to log into the exchange |
»» key | body | string | false | No description |
»» value | body | string | false | No description |
Detailed descriptions
» exchange_id: Exchange identifier and optional tag identifying specific account configured when the software will be managing multiple accounts on the same exchange; for eg:
BITSTAMP
BITSTAMP/7c177641-74bd-4dbe-9b01-2497c12a5f70`
BITSTAMP/2574
Allowed separators between the exchange identifier and the tag: ~/.,:;!@#$%^&*-_+=.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
400 | Bad Request (opens in a new tab) | Invalid exchange id | None |
405 | Method Not Allowed (opens in a new tab) | Validation exception | None |
Delete account DELETE
Code samples
curl --request DELETE \
--url 'https://ems-mgmt.coinapi.io/v1/accounts?exchange_id=string' \
--header 'X-CoinAPI-Key: API_KEY'
DELETE /v1/accounts
Delete specific exchange account maintained by the EMS API for your subscription.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
exchange_id | query | array[string] | true | Exchange identifier of the account to delete |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
404 | Not Found (opens in a new tab) | Exchange account not found | None |
Delete all accounts DELETE
Code samples
curl --request DELETE \
--url https://ems-mgmt.coinapi.io/v1/accounts/all \
--header 'X-CoinAPI-Key: API_KEY'
DELETE /v1/accounts/all
Delete all exchange accounts maintained by the EMS API for your subscription.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK (opens in a new tab) | OK | None |