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'."
}Get trading account credit limit and usage
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'."
}Was this page helpful?