curl --request GET \
--url https://api.anchorage-staging.com/v2/trading/settlements \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/trading/settlements"
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/settlements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"createdAt": "2020-11-10T20:24:20Z",
"settlementID": "c8e2fcb6-78fa-4b8a-8f6d-e3ff23093dd0",
"settlementStatus": "SETTLED",
"vault": {
"vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
},
"trades": [
{
"quantitySold": "1",
"currencySold": "USD",
"currencyBought": "BTC",
"price": "11681.67",
"quantityBought": "0.00008561",
"side": "BUY",
"timestamp": "2020-08-31T22:15:31.99999Z",
"tradeID": "e0538774-ebd9-11ea-adc1-0242ac120002",
"quoteID": "06f71d1e-e7e8-11ea-adc1-0242ac120011",
"vault": {
"vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
},
"tradeStatus": "SETTLED",
"tradingPair": "BTC-USD",
"fee": "0.01",
"feeCurrency": "USD"
},
{
"quantitySold": "1",
"currencySold": "USD",
"currencyBought": "ETH",
"price": "435.16",
"quantityBought": "0.00230049",
"side": "BUY",
"timestamp": "2020-08-31T22:14:07.99999Z",
"tradeID": "d1ae1416-ebd7-11ea-adc1-0242ac120002",
"quoteID": "06f71d1e-e7e8-11ea-adc1-0242ac120002",
"vault": {
"vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
},
"tradeStatus": "SETTLED",
"tradingPair": "ETH-USD",
"fee": "0.01",
"feeCurrency": "USD"
}
],
"positions": [
{
"positionAmount": {
"assetType": "BTC",
"quantity": "30.54447726"
}
},
{
"positionAmount": {
"assetType": "ETH",
"quantity": "8391"
}
}
],
"instructionsCrypto": [
{
"address": "cosmos10tucpr3m3rgaexzy0yf0j903mp3f6xsm02al50",
"assetTypeID": "ATOM"
},
{
"address": "bitcoincash:qq5z3pjyf2r3h9dyze644adywsr3vcncry2lmkvjlw",
"assetTypeID": "BCH"
},
{
"address": "3HZdacGTDVcWwjwKCb7sEoD3kVTxJ7d25P",
"assetTypeID": "BTC"
},
{
"address": "0xd52055A39a3d2f7505C739f981f296Ea31B50191",
"assetTypeID": "ETH"
}
]
},
{
"createdAt": "2020-11-10T15:39:05Z",
"settlementID": "w9e8hjq3-66rz-0j2n-1k6t-a2cg9834tt7",
"settlementStatus": "SETTLING",
"vault": {
"vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
},
"trades": [
{
"quantitySold": "590000",
"currencySold": "USD",
"currencyBought": "BTC",
"price": "43574.59",
"quantityBought": "13.54",
"side": "BUY",
"timestamp": "2020-08-31T22:15:31.99999Z",
"tradeID": "df4d3b1a-f70f-42c3-87e3-18a98c98c959",
"quoteID": "f3857ede-9eeb-468e-8124-75458cff0229",
"vault": {
"vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
},
"tradeStatus": "SETTLING",
"tradingPair": "BTC-USD",
"fee": "457.16",
"feeCurrency": "USD"
}
],
"positions": [
{
"positionAmount": {
"assetType": "BTC",
"quantity": "30.54447726"
}
}
],
"instructionsCrypto": [
{
"address": "cosmos10tucpr3m3rgaexzy0yf0j903mp3f6xsm02al50",
"assetTypeID": "ATOM"
},
{
"address": "bitcoincash:qq5z3pjyf2r3h9dyze644adywsr3vcncry2lmkvjlw",
"assetTypeID": "BCH"
},
{
"address": "3HZdacGTDVcWwjwKCb7sEoD3kVTxJ7d25P",
"assetTypeID": "BTC"
},
{
"address": "0xd52055A39a3d2f7505C739f981f296Ea31B50191",
"assetTypeID": "ETH"
}
]
}
],
"page": {
"next": "/v2/trading/settlements?endDate=2020-11-10&limit=2"
}
}{
"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'."
}List settlements
Permissions required: Execute trades or Read trade activity
List of all settlements. With permission Read trade activity all settlements of the organization may be read. With permission Execute trades only settlements this api key has created may be read.
Settlements are sorted in a descending order by their timestamp, i.e. the most recent settlement or the settlement with a timestamp closest to endDate is listed first.
Filters
You may optionally supply the following filters:
- Specify a one or multiple
statusto filter settlements. Multiple statuses should be separated by commas.
curl --request GET \
--url https://api.anchorage-staging.com/v2/trading/settlements \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/trading/settlements"
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/settlements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"createdAt": "2020-11-10T20:24:20Z",
"settlementID": "c8e2fcb6-78fa-4b8a-8f6d-e3ff23093dd0",
"settlementStatus": "SETTLED",
"vault": {
"vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
},
"trades": [
{
"quantitySold": "1",
"currencySold": "USD",
"currencyBought": "BTC",
"price": "11681.67",
"quantityBought": "0.00008561",
"side": "BUY",
"timestamp": "2020-08-31T22:15:31.99999Z",
"tradeID": "e0538774-ebd9-11ea-adc1-0242ac120002",
"quoteID": "06f71d1e-e7e8-11ea-adc1-0242ac120011",
"vault": {
"vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
},
"tradeStatus": "SETTLED",
"tradingPair": "BTC-USD",
"fee": "0.01",
"feeCurrency": "USD"
},
{
"quantitySold": "1",
"currencySold": "USD",
"currencyBought": "ETH",
"price": "435.16",
"quantityBought": "0.00230049",
"side": "BUY",
"timestamp": "2020-08-31T22:14:07.99999Z",
"tradeID": "d1ae1416-ebd7-11ea-adc1-0242ac120002",
"quoteID": "06f71d1e-e7e8-11ea-adc1-0242ac120002",
"vault": {
"vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
},
"tradeStatus": "SETTLED",
"tradingPair": "ETH-USD",
"fee": "0.01",
"feeCurrency": "USD"
}
],
"positions": [
{
"positionAmount": {
"assetType": "BTC",
"quantity": "30.54447726"
}
},
{
"positionAmount": {
"assetType": "ETH",
"quantity": "8391"
}
}
],
"instructionsCrypto": [
{
"address": "cosmos10tucpr3m3rgaexzy0yf0j903mp3f6xsm02al50",
"assetTypeID": "ATOM"
},
{
"address": "bitcoincash:qq5z3pjyf2r3h9dyze644adywsr3vcncry2lmkvjlw",
"assetTypeID": "BCH"
},
{
"address": "3HZdacGTDVcWwjwKCb7sEoD3kVTxJ7d25P",
"assetTypeID": "BTC"
},
{
"address": "0xd52055A39a3d2f7505C739f981f296Ea31B50191",
"assetTypeID": "ETH"
}
]
},
{
"createdAt": "2020-11-10T15:39:05Z",
"settlementID": "w9e8hjq3-66rz-0j2n-1k6t-a2cg9834tt7",
"settlementStatus": "SETTLING",
"vault": {
"vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
},
"trades": [
{
"quantitySold": "590000",
"currencySold": "USD",
"currencyBought": "BTC",
"price": "43574.59",
"quantityBought": "13.54",
"side": "BUY",
"timestamp": "2020-08-31T22:15:31.99999Z",
"tradeID": "df4d3b1a-f70f-42c3-87e3-18a98c98c959",
"quoteID": "f3857ede-9eeb-468e-8124-75458cff0229",
"vault": {
"vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
},
"tradeStatus": "SETTLING",
"tradingPair": "BTC-USD",
"fee": "457.16",
"feeCurrency": "USD"
}
],
"positions": [
{
"positionAmount": {
"assetType": "BTC",
"quantity": "30.54447726"
}
}
],
"instructionsCrypto": [
{
"address": "cosmos10tucpr3m3rgaexzy0yf0j903mp3f6xsm02al50",
"assetTypeID": "ATOM"
},
{
"address": "bitcoincash:qq5z3pjyf2r3h9dyze644adywsr3vcncry2lmkvjlw",
"assetTypeID": "BCH"
},
{
"address": "3HZdacGTDVcWwjwKCb7sEoD3kVTxJ7d25P",
"assetTypeID": "BTC"
},
{
"address": "0xd52055A39a3d2f7505C739f981f296Ea31B50191",
"assetTypeID": "ETH"
}
]
}
],
"page": {
"next": "/v2/trading/settlements?endDate=2020-11-10&limit=2"
}
}{
"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'."
}Query Parameters
The start date (inclusive) in YYYY-MM-DD format. The earliest valid start date is 2017-01-01. The last valid start date is the current date. Dates are always in UTC RFC 3339 'full-date'.
The end date (inclusive) in YYYY-MM-DD format. The latest valid end date is the current date. Dates are always in UTC RFC 3339 'full-date'.
Was this page helpful?