List orders
curl --request GET \
--url https://flash.definitive.fi/v1/orders \
--header 'x-definitive-api-key: <api-key>'import requests
url = "https://flash.definitive.fi/v1/orders"
headers = {"x-definitive-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-definitive-api-key': '<api-key>'}};
fetch('https://flash.definitive.fi/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"orders": [
{
"orderId": "<string>",
"orderType": "market",
"side": "buy",
"status": "ORDER_STATUS_UNSPECIFIED",
"closeReason": "<string>",
"funderAddress": "<string>",
"recipientAddress": "<string>",
"integratorFeeBps": "<string>",
"tradeFeeBps": "<string>",
"targetAsset": {
"id": "<string>",
"name": "<string>",
"address": "<string>",
"ticker": "<string>",
"chain": {
"id": "<string>",
"name": "<string>",
"namespace": "<string>"
}
},
"contraAsset": {
"id": "<string>",
"name": "<string>",
"address": "<string>",
"ticker": "<string>",
"chain": {
"id": "<string>",
"name": "<string>",
"namespace": "<string>"
}
},
"qty": "<string>",
"filled": {
"targetAmount": "<string>",
"contraAmount": "<string>",
"averagePrice": "<string>",
"averageNotionalPrice": "<string>"
},
"limitNotionalPrice": "<string>",
"limitCrossPrice": "<string>",
"trigger": {
"triggerType": "upper",
"notionalPrice": "1800",
"crossPrice": "1800"
},
"brackets": [
{
"triggerType": "upper",
"notionalPrice": "1800",
"crossPrice": "1800"
}
],
"maxPriceImpact": "<string>",
"twapBucketCount": 123,
"placedAt": "2023-11-07T05:31:56Z",
"acceptedAt": "2023-11-07T05:31:56Z",
"closedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2026-05-12T00:00:00Z",
"attachedBracket": {
"status": "pending_activation",
"bracketOrderId": "<string>",
"takeProfit": {
"notionalPrice": "<string>",
"crossPrice": "<string>",
"limitPrice": "<string>"
},
"stopLoss": {
"notionalPrice": "<string>",
"crossPrice": "<string>",
"limitPrice": "<string>"
},
"signedMaxFromAmount": "<string>",
"expiresAt": "<string>"
},
"sourceEntryOrderId": "<string>"
}
],
"nextPageToken": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Trading REST
List orders
List Flash orders for a funder, most recent first. Returns up to pageSize orders per page; pass nextPageToken back as pageToken to fetch the next page.
GET
/
orders
List orders
curl --request GET \
--url https://flash.definitive.fi/v1/orders \
--header 'x-definitive-api-key: <api-key>'import requests
url = "https://flash.definitive.fi/v1/orders"
headers = {"x-definitive-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-definitive-api-key': '<api-key>'}};
fetch('https://flash.definitive.fi/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"orders": [
{
"orderId": "<string>",
"orderType": "market",
"side": "buy",
"status": "ORDER_STATUS_UNSPECIFIED",
"closeReason": "<string>",
"funderAddress": "<string>",
"recipientAddress": "<string>",
"integratorFeeBps": "<string>",
"tradeFeeBps": "<string>",
"targetAsset": {
"id": "<string>",
"name": "<string>",
"address": "<string>",
"ticker": "<string>",
"chain": {
"id": "<string>",
"name": "<string>",
"namespace": "<string>"
}
},
"contraAsset": {
"id": "<string>",
"name": "<string>",
"address": "<string>",
"ticker": "<string>",
"chain": {
"id": "<string>",
"name": "<string>",
"namespace": "<string>"
}
},
"qty": "<string>",
"filled": {
"targetAmount": "<string>",
"contraAmount": "<string>",
"averagePrice": "<string>",
"averageNotionalPrice": "<string>"
},
"limitNotionalPrice": "<string>",
"limitCrossPrice": "<string>",
"trigger": {
"triggerType": "upper",
"notionalPrice": "1800",
"crossPrice": "1800"
},
"brackets": [
{
"triggerType": "upper",
"notionalPrice": "1800",
"crossPrice": "1800"
}
],
"maxPriceImpact": "<string>",
"twapBucketCount": 123,
"placedAt": "2023-11-07T05:31:56Z",
"acceptedAt": "2023-11-07T05:31:56Z",
"closedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2026-05-12T00:00:00Z",
"attachedBracket": {
"status": "pending_activation",
"bracketOrderId": "<string>",
"takeProfit": {
"notionalPrice": "<string>",
"crossPrice": "<string>",
"limitPrice": "<string>"
},
"stopLoss": {
"notionalPrice": "<string>",
"crossPrice": "<string>",
"limitPrice": "<string>"
},
"signedMaxFromAmount": "<string>",
"expiresAt": "<string>"
},
"sourceEntryOrderId": "<string>"
}
],
"nextPageToken": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Authorizations
Your Definitive API key.
Query Parameters
Funder wallet address whose orders to list. When omitted, orders for every funder in the portfolio are returned.
Minimum string length:
1Comma-separated list of order statuses to filter by. When omitted, orders of every status are returned.
Example:
"ORDER_STATUS_FILLED,ORDER_STATUS_CANCELLED"
Number of orders to return. Defaults to 50; capped at 200.
Required range:
1 <= x <= 200Fetch the next page by passing the nextPageToken from your previous response. Leave it out to get the first page. Copy the value exactly as-is — it's not meant to be read or built by hand.