Orders
List orders
Returns your orders newest-first with opaque cursor pagination. Filter by status and a from/to creation-time window.
GET
/
v1
/
orders
List orders
curl --request GET \
--url https://api.example.com/v1/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"beneficiaryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"fromAmount": "1006.5000",
"fromCurrency": "USDT",
"fundingDeadlineAt": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rate": "0.00067100",
"status": "created",
"toAmount": "1500000.0000",
"toCurrency": "NGN",
"updatedAt": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRef": "<string>",
"completedAt": "<string>",
"executionDeadlineAt": "<string>",
"failureReason": "execution_failed",
"fundedAt": "<string>",
"purpose": "<string>",
"settlement": {
"currency": "XOF",
"expiresAt": "<string>",
"instructions": {},
"method": "virtual_account",
"reference": "SETTLE-4F7A2C91B0",
"requiredAmount": "1006.5000",
"requirements": {
"proofOfPayment": true
},
"settlementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "open"
},
"uetr": "<string>"
}
],
"hasMore": true,
"nextCursor": "eyJ2IjoxLCJjcmVhdGVkQXQiOiIyMDI2LTAxLTAxVDAwOjAwOjAwLjAwMFoiLCJpZCI6IjEyM2U0NTY3LWU4OWItNDJkMy1hNDU2LTQyNjYxNDE3NDAwMCJ9",
"object": "payout.list"
}{
"error": "BAD_REQUEST",
"message": "Bad Request",
"path": "/v1/resource",
"statusCode": 400,
"timestamp": "2024-01-15T10:30:00.000Z"
}{
"error": "BAD_REQUEST",
"message": "Bad Request",
"path": "/v1/resource",
"statusCode": 400,
"timestamp": "2024-01-15T10:30:00.000Z"
}Authorizations
Enter Auth0 JWT token
Query Parameters
Opaque cursor returned by the previous page
Number of items per page
Required range:
1 <= x <= 100Filter by status
Available options:
created, awaiting_funds, funds_received, executing, completed, failed, expired, cancelled ISO-8601 lower bound on createdAt (inclusive)
ISO-8601 upper bound on createdAt (exclusive)
Response
Show child attributes
Show child attributes
Whether more items exist after this page
Example:
true
Opaque cursor for the next page, or null when there are no more items
Example:
"eyJ2IjoxLCJjcmVhdGVkQXQiOiIyMDI2LTAxLTAxVDAwOjAwOjAwLjAwMFoiLCJpZCI6IjEyM2U0NTY3LWU4OWItNDJkMy1hNDU2LTQyNjYxNDE3NDAwMCJ9"
Stable resource-specific collection discriminator
Available options:
order.list Pattern:
^[a-z][a-z0-9_]*\.list$Example:
"payout.list"
⌘I
List orders
curl --request GET \
--url https://api.example.com/v1/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"beneficiaryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"fromAmount": "1006.5000",
"fromCurrency": "USDT",
"fundingDeadlineAt": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rate": "0.00067100",
"status": "created",
"toAmount": "1500000.0000",
"toCurrency": "NGN",
"updatedAt": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clientRef": "<string>",
"completedAt": "<string>",
"executionDeadlineAt": "<string>",
"failureReason": "execution_failed",
"fundedAt": "<string>",
"purpose": "<string>",
"settlement": {
"currency": "XOF",
"expiresAt": "<string>",
"instructions": {},
"method": "virtual_account",
"reference": "SETTLE-4F7A2C91B0",
"requiredAmount": "1006.5000",
"requirements": {
"proofOfPayment": true
},
"settlementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "open"
},
"uetr": "<string>"
}
],
"hasMore": true,
"nextCursor": "eyJ2IjoxLCJjcmVhdGVkQXQiOiIyMDI2LTAxLTAxVDAwOjAwOjAwLjAwMFoiLCJpZCI6IjEyM2U0NTY3LWU4OWItNDJkMy1hNDU2LTQyNjYxNDE3NDAwMCJ9",
"object": "payout.list"
}{
"error": "BAD_REQUEST",
"message": "Bad Request",
"path": "/v1/resource",
"statusCode": 400,
"timestamp": "2024-01-15T10:30:00.000Z"
}{
"error": "BAD_REQUEST",
"message": "Bad Request",
"path": "/v1/resource",
"statusCode": 400,
"timestamp": "2024-01-15T10:30:00.000Z"
}