Get trading account credit limit and usage
curl --request GET \
--url https://api.anchorage-staging.com/v2/trading/accounts/{accountId}/credit \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/trading/accounts/{accountId}/credit"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v2/trading/accounts/{accountId}/credit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"limits": [
{
"quantity": "250000.00",
"assetType": "USD"
},
{
"quantity": "1",
"assetType": "BTC"
}
],
"usage": [
{
"quantity": "5000.00",
"assetType": "USD"
},
{
"quantity": "0.2",
"assetType": "BTC"
}
]
}
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Permissions required: Read trade activity
Get the credit limit and usage of a trading account per asset. Current USD prices are not returned, only assets and their quantity.
Still under development, return empty replies.
GET
/
trading
/
accounts
/
{accountId}
/
credit
Get trading account credit limit and usage
curl --request GET \
--url https://api.anchorage-staging.com/v2/trading/accounts/{accountId}/credit \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/trading/accounts/{accountId}/credit"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v2/trading/accounts/{accountId}/credit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"limits": [
{
"quantity": "250000.00",
"assetType": "USD"
},
{
"quantity": "1",
"assetType": "BTC"
}
],
"usage": [
{
"quantity": "5000.00",
"assetType": "USD"
},
{
"quantity": "0.2",
"assetType": "BTC"
}
]
}
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Authorizations
An API key associated with a security role
Path Parameters
The ID of the trading account to get the credit for
Response
Successfully returned the credit of the trading account
Show child attributes
Show child attributes
Was this page helpful?