Place an order
curl --request POST \
--url https://api.pro.xentfi.com/v1/orderbook/orders \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'orgId: <api-key>' \
--data '
{
"marketSymbol": "USDC-USDT",
"walletId": "<string>",
"quantity": "<string>",
"clientOrderId": "<string>"
}
'const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
marketSymbol: 'USDC-USDT',
walletId: '<string>',
quantity: '<string>',
clientOrderId: '<string>'
})
};
fetch('https://api.pro.xentfi.com/v1/orderbook/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pro.xentfi.com/v1/orderbook/orders"
payload = {
"marketSymbol": "USDC-USDT",
"walletId": "<string>",
"quantity": "<string>",
"clientOrderId": "<string>"
}
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pro.xentfi.com/v1/orderbook/orders"
payload := strings.NewReader("{\n \"marketSymbol\": \"USDC-USDT\",\n \"walletId\": \"<string>\",\n \"quantity\": \"<string>\",\n \"clientOrderId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
marketSymbol: 'USDC-USDT',
walletId: '<string>',
quantity: '<string>',
clientOrderId: '<string>'
})
};
fetch('https://api.pro.xentfi.com/v1/orderbook/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"organisationId": "<string>",
"appId": "<string>",
"marketId": "<string>",
"walletId": "<string>",
"clientOrderId": "<string>",
"side": "BUY",
"type": "LIMIT",
"timeInForce": "GTC",
"price": "<string>",
"quantity": "<string>",
"filledQuantity": "<string>",
"reservedBalance": "<string>",
"status": "PENDING_RISK",
"rejectReason": "<string>",
"sequence": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}OrderBook
Place an order
Places a LIMIT, MARKET, POST_ONLY, IOC, or FOK order on the given market. Performs rate limiting, price-band validation, and an atomic balance reservation before the order is admitted to the book. Matching happens asynchronously on the market’s batch-auction cadence (see the market’s batchAuctionIntervalMs), so a 201 response means the order was admitted, not necessarily filled.
POST
/
v1
/
orderbook
/
orders
Place an order
curl --request POST \
--url https://api.pro.xentfi.com/v1/orderbook/orders \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'orgId: <api-key>' \
--data '
{
"marketSymbol": "USDC-USDT",
"walletId": "<string>",
"quantity": "<string>",
"clientOrderId": "<string>"
}
'const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
marketSymbol: 'USDC-USDT',
walletId: '<string>',
quantity: '<string>',
clientOrderId: '<string>'
})
};
fetch('https://api.pro.xentfi.com/v1/orderbook/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pro.xentfi.com/v1/orderbook/orders"
payload = {
"marketSymbol": "USDC-USDT",
"walletId": "<string>",
"quantity": "<string>",
"clientOrderId": "<string>"
}
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pro.xentfi.com/v1/orderbook/orders"
payload := strings.NewReader("{\n \"marketSymbol\": \"USDC-USDT\",\n \"walletId\": \"<string>\",\n \"quantity\": \"<string>\",\n \"clientOrderId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
marketSymbol: 'USDC-USDT',
walletId: '<string>',
quantity: '<string>',
clientOrderId: '<string>'
})
};
fetch('https://api.pro.xentfi.com/v1/orderbook/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"organisationId": "<string>",
"appId": "<string>",
"marketId": "<string>",
"walletId": "<string>",
"clientOrderId": "<string>",
"side": "BUY",
"type": "LIMIT",
"timeInForce": "GTC",
"price": "<string>",
"quantity": "<string>",
"filledQuantity": "<string>",
"reservedBalance": "<string>",
"status": "PENDING_RISK",
"rejectReason": "<string>",
"sequence": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Body
application/json
Example:
"USDC-USDT"
Xentfi WaaS child wallet ID placing the order
Available options:
BUY, SELL Available options:
LIMIT, MARKET, POST_ONLY, IOC, FOK Available options:
GTC, IOC, FOK, GTT Base asset units. Decimal string.
Caller-supplied idempotency key, unique per organisation+app.
Required for LIMIT and POST_ONLY orders. Decimal string.
Response
Order admitted
Show child attributes
Show child attributes
⌘I

