Buy/Sell Orders
Endpoints to process crypto exchange orders and retrieve their details.
If you are a neobank or fintech app, reach out to our team to activate the pool_balance
features.
Create a New Order
POST
https://live.betaapp.com/v1/order/exchange
Beta will freeze the quote for this order for 20 minutes.
If the User deposits a different amount/asset than requested or after this timeframe, our platform will automatically trigger workflows for the payer to top-up the remaining amount or receive a refund for its deposit.
Headers
Authorization*
String
Bearer {access_token}
x-sub-account-id*
String
subaccount ID
accept*
String
application/json
Request Body
source_asset*
String
Asset that user wants to provide in the transaction. It could be any Fiat or Crypto.
target_asset*
String
Asset that user wants to receive in the transaction. It could be any Fiat or Crypto.
network
String
Crypto network
source_amount
String
Amount that payer wants to deposit
pool_balance
Boolean
True or False.
target_amount
String
Amount that payer wants to receive
{
"amount": 0,
"asset": {
"large_image_url": "string",
"medium_image_url": "string",
"name": "string",
"small_image_url": "string",
"symbol": "string",
"type": "string"
},
"date_time": "string",
"deposit": true,
"exp_time": 0,
"message": "string",
"network": "string",
"tag": "string",
"wallet_address": "string"
}
If Target Asset is a FIAT currency, it means the subaccount is selling crypto. However, if it is a CRYPTO asset, it means the subaccount is purchasing crypto.
Request Example:
curl -X 'POST' \
'https://live.betaapp.com/v1/order/exchange' \
-H 'accept: application/json' \
-H 'X-sub-account-id: 22376b76-fe59-4f91-bce3-4cef3543083b' \
-H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InJlaEF1NURPY...ctfx2I4g' \
-H 'Content-Type: application/json' \
-d '{
"network": "bitcoin",
"pool_balance": true,
"source_amount": 12000,
"source_asset": "MXN",
"target_amount": 0,
"target_asset": "BTC"
}'
Response Example:
{
"asset": {
"name": "Mexican Peso",
"type": "",
"small_image_url": "https://storage.googleapis.com/cryptoassets_images/20px/MXN-20.png",
"medium_image_url": "https://storage.googleapis.com/cryptoassets_images/35px/MXN-35.png",
"large_image_url": "https://storage.googleapis.com/cryptoassets_images/69px/MXN-69.png"
},
"amount": 0.017672,
"network": "bitcoin",
"exp_time": 1200,
"deposit": false,
"date_time": "2023-11-22T13:09:33.079445313Z"
}
Here is an example of how the New Order Response could be displayed on the Front-End.

Retrieve Order List
GET
https://live.betaapp.com/v1/order
This endpoint retrieves the Order List of a specific subaccount_id
.
Query Parameters
status
String
Parameters: open, pending, confirmed, canceled.
search
String
could be the e-mail or order description
order_by
String
Parameters: id, recipient_email, description, created_at, status
page*
Integer
Page number for this query
size*
integer
Number of items per page for this query
Headers
Authorization*
String
Bearer {access_token}
x-sub-account-id
String
Subaccount ID
accept*
String
application/json
{
"message": "string",
"orders": [
{
"account_id": "string",
"created_at": "string",
"description": "string",
"id": "string",
"recipient_email": "string",
"status": "string",
"target_amount": 0,
"target_asset": "string",
"valid_until": "string"
}
]
}
Request Example:
curl -X 'GET' \
'https://live.betaapp.com/v1/order?page=10&size=2' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InJlaEF1NURPY...ctfx2I4g'
Response Example:
{
"orders": [
{
"id": "dd299198-f1b4-4b82-8daa-9c16b1da7fb1",
"account_id": "39b745ba...847f49",
"sub_account_id": "94850a8c...881047",
"recipient_email": "[email protected]",
"description": "",
"status": "confirmed",
"source_asset": "XOF",
"source_amount": 1000000,
"target_asset": "BTC",
"target_amount": 0.039094,
"valid_until": "2023-11-14T14:56:43.615066Z",
"created_at": "2023-11-13T14:56:43.615066Z"
},
{
"id": "3e9bb519-58a4-454f-8474-c3ca4cf9c3d8",
"account_id": "39b745ba...847f49",
"sub_account_id": "94850a8c...881047",
"recipient_email": "[email protected]",
"description": "",
"status": "confirmed",
"source_asset": "XOF",
"source_amount": 1000000,
"target_asset": "BTC",
"target_amount": 0.039193,
"valid_until": "2023-11-14T14:47:08.137369Z",
"created_at": "2023-11-13T14:47:08.137369Z"
}
],
"page": 10,
"size": 2,
"total_page": 12,
"total_row": 23
}
Retrieve Order Details
GET
https://live.betaapp.com/v1/orders/details/{id}
This endpoint provides the details of a specific payment.
Query Parameters
id*
String
Order ID
Headers
Authorization*
String
Bearer {access_token}
x-sub-account-id*
String
Your user's subaccount_id
accept*
String
application/json
{
"created_at": "string",
"description": "string",
"id": "string",
"message": "string",
"recipient_email": "string",
"status": "string",
"target_amount": 0,
"target_asset": "string",
"timelines": [
{
"comments": "string",
"executed": true,
"executed_at": "string",
"order_step": "string"
}
]
}
Request Example:
curl -X 'GET' \
'https://live.betaapp.com/v1/order/details/e6282263-f947-48c8-9c25-334696a4940e' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InJlaEF1NURPY...ctfx2I4g'
Response Example:
{
"id": "e6282263-f947-48c8-9c25-334696a4940e",
"source_asset": "XRP",
"source_amount": 64.76,
"target_asset": "BRL",
"target_amount": 200,
"description": "Testing Order",
"recipient_email": "[email protected]",
"status": "canceled",
"settlement_status": "",
"created_at": "2023-11-13T15:14:46.847698Z",
"timelines": [
{
"order_step": "Order Created",
"executed": true,
"comments": "",
"executed_at": "2023-11-13T15:14:46.847698Z"
},
{
"order_step": "Payment Link Opened",
"executed": true,
"comments": "",
"executed_at": "2023-11-13T15:14:49.078719Z"
},
{
"order_step": "Deposit Initiated",
"executed": true,
"comments": "",
"executed_at": "2023-11-13T15:14:51.371398Z"
},
{
"order_step": "Paid",
"executed": false,
"comments": "",
"executed_at": "0001-01-01T00:00:00Z"
},
{
"order_step": "Settlement",
"executed": false,
"comments": "",
"executed_at": "0001-01-01T00:00:00Z"
}
]
}
Last updated