Create order
curl --request POST \
--url https://api.numofx.com/v1/orders \
--header 'Content-Type: application/json' \
--data '
{
"order_id": "<string>",
"owner_address": "<string>",
"signer_address": "<string>",
"subaccount_id": "<string>",
"recipient_id": "<string>",
"nonce": "<string>",
"asset_address": "<string>",
"worst_fee": "<string>",
"expiry": 123,
"action_json": "<unknown>",
"signature": "<string>",
"sub_id": "0",
"desired_amount": "<string>",
"filled_amount": "0",
"limit_price": "<string>",
"order_entry_spec": "usdc_cngn_spot_v1",
"ui_intent": {
"price": "1371.977018",
"size": "1.199729"
}
}
'import requests
url = "https://api.numofx.com/v1/orders"
payload = {
"order_id": "<string>",
"owner_address": "<string>",
"signer_address": "<string>",
"subaccount_id": "<string>",
"recipient_id": "<string>",
"nonce": "<string>",
"asset_address": "<string>",
"worst_fee": "<string>",
"expiry": 123,
"action_json": "<unknown>",
"signature": "<string>",
"sub_id": "0",
"desired_amount": "<string>",
"filled_amount": "0",
"limit_price": "<string>",
"order_entry_spec": "usdc_cngn_spot_v1",
"ui_intent": {
"price": "1371.977018",
"size": "1.199729"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
order_id: '<string>',
owner_address: '<string>',
signer_address: '<string>',
subaccount_id: '<string>',
recipient_id: '<string>',
nonce: '<string>',
asset_address: '<string>',
worst_fee: '<string>',
expiry: 123,
action_json: '<unknown>',
signature: '<string>',
sub_id: '0',
desired_amount: '<string>',
filled_amount: '0',
limit_price: '<string>',
order_entry_spec: 'usdc_cngn_spot_v1',
ui_intent: {price: '1371.977018', size: '1.199729'}
})
};
fetch('https://api.numofx.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.numofx.com/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order_id' => '<string>',
'owner_address' => '<string>',
'signer_address' => '<string>',
'subaccount_id' => '<string>',
'recipient_id' => '<string>',
'nonce' => '<string>',
'asset_address' => '<string>',
'worst_fee' => '<string>',
'expiry' => 123,
'action_json' => '<unknown>',
'signature' => '<string>',
'sub_id' => '0',
'desired_amount' => '<string>',
'filled_amount' => '0',
'limit_price' => '<string>',
'order_entry_spec' => 'usdc_cngn_spot_v1',
'ui_intent' => [
'price' => '1371.977018',
'size' => '1.199729'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.numofx.com/v1/orders"
payload := strings.NewReader("{\n \"order_id\": \"<string>\",\n \"owner_address\": \"<string>\",\n \"signer_address\": \"<string>\",\n \"subaccount_id\": \"<string>\",\n \"recipient_id\": \"<string>\",\n \"nonce\": \"<string>\",\n \"asset_address\": \"<string>\",\n \"worst_fee\": \"<string>\",\n \"expiry\": 123,\n \"action_json\": \"<unknown>\",\n \"signature\": \"<string>\",\n \"sub_id\": \"0\",\n \"desired_amount\": \"<string>\",\n \"filled_amount\": \"0\",\n \"limit_price\": \"<string>\",\n \"order_entry_spec\": \"usdc_cngn_spot_v1\",\n \"ui_intent\": {\n \"price\": \"1371.977018\",\n \"size\": \"1.199729\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.numofx.com/v1/orders")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": \"<string>\",\n \"owner_address\": \"<string>\",\n \"signer_address\": \"<string>\",\n \"subaccount_id\": \"<string>\",\n \"recipient_id\": \"<string>\",\n \"nonce\": \"<string>\",\n \"asset_address\": \"<string>\",\n \"worst_fee\": \"<string>\",\n \"expiry\": 123,\n \"action_json\": \"<unknown>\",\n \"signature\": \"<string>\",\n \"sub_id\": \"0\",\n \"desired_amount\": \"<string>\",\n \"filled_amount\": \"0\",\n \"limit_price\": \"<string>\",\n \"order_entry_spec\": \"usdc_cngn_spot_v1\",\n \"ui_intent\": {\n \"price\": \"1371.977018\",\n \"size\": \"1.199729\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numofx.com/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_id\": \"<string>\",\n \"owner_address\": \"<string>\",\n \"signer_address\": \"<string>\",\n \"subaccount_id\": \"<string>\",\n \"recipient_id\": \"<string>\",\n \"nonce\": \"<string>\",\n \"asset_address\": \"<string>\",\n \"worst_fee\": \"<string>\",\n \"expiry\": 123,\n \"action_json\": \"<unknown>\",\n \"signature\": \"<string>\",\n \"sub_id\": \"0\",\n \"desired_amount\": \"<string>\",\n \"filled_amount\": \"0\",\n \"limit_price\": \"<string>\",\n \"order_entry_spec\": \"usdc_cngn_spot_v1\",\n \"ui_intent\": {\n \"price\": \"1371.977018\",\n \"size\": \"1.199729\"\n }\n}"
response = http.request(request)
puts response.read_body{
"order": {
"order_id": "<string>",
"owner_address": "<string>",
"signer_address": "<string>",
"subaccount_id": "<string>",
"recipient_id": "<string>",
"nonce": "<string>",
"side": "buy",
"asset_address": "<string>",
"sub_id": "<string>",
"desired_amount": "<string>",
"filled_amount": "<string>",
"limit_price": "<string>",
"worst_fee": "<string>",
"expiry": 123,
"action_json": "<unknown>",
"signature": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"market": "<string>",
"contract_type": "<string>",
"settlement_type": "<string>",
"base_asset_symbol": "<string>",
"quote_asset_symbol": "<string>",
"display_name": "<string>",
"display_label": "<string>",
"tick_size": "<string>",
"price_semantics": "<string>",
"display_semantics": "<string>",
"spot_contract": {
"spec": "usdc_cngn_spot_v1",
"ui_intent": {
"side": "buy",
"price": "1371.977018",
"size": "1.199729"
},
"engine_order": {
"side": "buy",
"price": "0.000728875182750367",
"amount": "1646"
},
"balance_delta": {
"usdc": "-1.199729",
"cngn": "+1646"
}
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Markets service
Create order
POST
/
v1
/
orders
Create order
curl --request POST \
--url https://api.numofx.com/v1/orders \
--header 'Content-Type: application/json' \
--data '
{
"order_id": "<string>",
"owner_address": "<string>",
"signer_address": "<string>",
"subaccount_id": "<string>",
"recipient_id": "<string>",
"nonce": "<string>",
"asset_address": "<string>",
"worst_fee": "<string>",
"expiry": 123,
"action_json": "<unknown>",
"signature": "<string>",
"sub_id": "0",
"desired_amount": "<string>",
"filled_amount": "0",
"limit_price": "<string>",
"order_entry_spec": "usdc_cngn_spot_v1",
"ui_intent": {
"price": "1371.977018",
"size": "1.199729"
}
}
'import requests
url = "https://api.numofx.com/v1/orders"
payload = {
"order_id": "<string>",
"owner_address": "<string>",
"signer_address": "<string>",
"subaccount_id": "<string>",
"recipient_id": "<string>",
"nonce": "<string>",
"asset_address": "<string>",
"worst_fee": "<string>",
"expiry": 123,
"action_json": "<unknown>",
"signature": "<string>",
"sub_id": "0",
"desired_amount": "<string>",
"filled_amount": "0",
"limit_price": "<string>",
"order_entry_spec": "usdc_cngn_spot_v1",
"ui_intent": {
"price": "1371.977018",
"size": "1.199729"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
order_id: '<string>',
owner_address: '<string>',
signer_address: '<string>',
subaccount_id: '<string>',
recipient_id: '<string>',
nonce: '<string>',
asset_address: '<string>',
worst_fee: '<string>',
expiry: 123,
action_json: '<unknown>',
signature: '<string>',
sub_id: '0',
desired_amount: '<string>',
filled_amount: '0',
limit_price: '<string>',
order_entry_spec: 'usdc_cngn_spot_v1',
ui_intent: {price: '1371.977018', size: '1.199729'}
})
};
fetch('https://api.numofx.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.numofx.com/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order_id' => '<string>',
'owner_address' => '<string>',
'signer_address' => '<string>',
'subaccount_id' => '<string>',
'recipient_id' => '<string>',
'nonce' => '<string>',
'asset_address' => '<string>',
'worst_fee' => '<string>',
'expiry' => 123,
'action_json' => '<unknown>',
'signature' => '<string>',
'sub_id' => '0',
'desired_amount' => '<string>',
'filled_amount' => '0',
'limit_price' => '<string>',
'order_entry_spec' => 'usdc_cngn_spot_v1',
'ui_intent' => [
'price' => '1371.977018',
'size' => '1.199729'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.numofx.com/v1/orders"
payload := strings.NewReader("{\n \"order_id\": \"<string>\",\n \"owner_address\": \"<string>\",\n \"signer_address\": \"<string>\",\n \"subaccount_id\": \"<string>\",\n \"recipient_id\": \"<string>\",\n \"nonce\": \"<string>\",\n \"asset_address\": \"<string>\",\n \"worst_fee\": \"<string>\",\n \"expiry\": 123,\n \"action_json\": \"<unknown>\",\n \"signature\": \"<string>\",\n \"sub_id\": \"0\",\n \"desired_amount\": \"<string>\",\n \"filled_amount\": \"0\",\n \"limit_price\": \"<string>\",\n \"order_entry_spec\": \"usdc_cngn_spot_v1\",\n \"ui_intent\": {\n \"price\": \"1371.977018\",\n \"size\": \"1.199729\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.numofx.com/v1/orders")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": \"<string>\",\n \"owner_address\": \"<string>\",\n \"signer_address\": \"<string>\",\n \"subaccount_id\": \"<string>\",\n \"recipient_id\": \"<string>\",\n \"nonce\": \"<string>\",\n \"asset_address\": \"<string>\",\n \"worst_fee\": \"<string>\",\n \"expiry\": 123,\n \"action_json\": \"<unknown>\",\n \"signature\": \"<string>\",\n \"sub_id\": \"0\",\n \"desired_amount\": \"<string>\",\n \"filled_amount\": \"0\",\n \"limit_price\": \"<string>\",\n \"order_entry_spec\": \"usdc_cngn_spot_v1\",\n \"ui_intent\": {\n \"price\": \"1371.977018\",\n \"size\": \"1.199729\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numofx.com/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_id\": \"<string>\",\n \"owner_address\": \"<string>\",\n \"signer_address\": \"<string>\",\n \"subaccount_id\": \"<string>\",\n \"recipient_id\": \"<string>\",\n \"nonce\": \"<string>\",\n \"asset_address\": \"<string>\",\n \"worst_fee\": \"<string>\",\n \"expiry\": 123,\n \"action_json\": \"<unknown>\",\n \"signature\": \"<string>\",\n \"sub_id\": \"0\",\n \"desired_amount\": \"<string>\",\n \"filled_amount\": \"0\",\n \"limit_price\": \"<string>\",\n \"order_entry_spec\": \"usdc_cngn_spot_v1\",\n \"ui_intent\": {\n \"price\": \"1371.977018\",\n \"size\": \"1.199729\"\n }\n}"
response = http.request(request)
puts response.read_body{
"order": {
"order_id": "<string>",
"owner_address": "<string>",
"signer_address": "<string>",
"subaccount_id": "<string>",
"recipient_id": "<string>",
"nonce": "<string>",
"side": "buy",
"asset_address": "<string>",
"sub_id": "<string>",
"desired_amount": "<string>",
"filled_amount": "<string>",
"limit_price": "<string>",
"worst_fee": "<string>",
"expiry": 123,
"action_json": "<unknown>",
"signature": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"market": "<string>",
"contract_type": "<string>",
"settlement_type": "<string>",
"base_asset_symbol": "<string>",
"quote_asset_symbol": "<string>",
"display_name": "<string>",
"display_label": "<string>",
"tick_size": "<string>",
"price_semantics": "<string>",
"display_semantics": "<string>",
"spot_contract": {
"spec": "usdc_cngn_spot_v1",
"ui_intent": {
"side": "buy",
"price": "1371.977018",
"size": "1.199729"
},
"engine_order": {
"side": "buy",
"price": "0.000728875182750367",
"amount": "1646"
},
"balance_delta": {
"usdc": "-1.199729",
"cngn": "+1646"
}
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json
Available options:
buy, sell Spot markets only — sending it on an order for any other market is rejected. Optional: omit both this and ui_intent to submit raw engine values. If either is present, this must be exactly usdc_cngn_spot_v1 and ui_intent becomes required.
Example:
"usdc_cngn_spot_v1"
Spot markets only — sending it on an order for any other market is rejected. Optional, and paired with order_entry_spec: sending one without the other is rejected. When present, the service derives side, limit_price and desired_amount from it. If you send those fields as well, each must match the translation exactly or the order is rejected.
Show child attributes
Show child attributes
Response
Accepted order
Show child attributes
Show child attributes
Was this page helpful?
⌘I

