Fetch all the orders of the user, which includes the history of tokens sent and received.
Headers
Authorization
: string
Authorization token received from Okto.
Query Parameters
offset
: number
The number of items to skip before starting to collect the result set. Default is 0.
limit
: number
The number of items to return. Default is 10.
order_id
: string
The order id to get the specific order details.
order_state
: string
The order state to filter the orders. Possible values are PENDING
, SUCCESS
, FAILED
.
Code
curl -X GET '${baseUrl}/api/v1/orders?offset=0&limit=1&order_id=80f5b553-4650-4943-9721-8db41d78ccc9&order_state=SUCCESS'
-H 'x-api-key: YOUR_CLIENT_API_KEY'
-H 'accept: application/json'
-H 'Authorization: Bearer AUTH_TOKEN'
Response
{
"status": "success",
"data": {
"total": 3,
"jobs": [
{
"order_id": "20b57c3f-7ea3-4531-8bb8-313c870ebc1a",
"order_type": "DEFI_TO_EXT",
"network_name": "APTOS",
"status": "SUCCESS",
"transaction_hash": "0x837fa598ae893cb307dc9fbeac1a40c464fbd9565337be8f3c0abff8de1f286a"
},
{
"order_id": "e0f1eac5-4f8c-444c-ac57-898553027ab5",
"order_type": "DEFI_TO_EXT",
"network_name": "APTOS",
"status": "SUCCESS",
"transaction_hash": "0xb38fae8adb8c7f907def22d0b132b42e1adc4bc7f99ab378634cc99c9aedf74e"
},
{
"order_id": "f25d2dfb-c3ca-48cd-8e08-f6ea3601854b",
"order_type": "DEFI_TO_EXT",
"network_name": "APTOS",
"status": "SUCCESS",
"transaction_hash": "0xcdd0a0ff73c44d24fcf9653d68876e12ac1fcc87aaecacce4309b59679822ebc"
}
]
}
}