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": "<string>",
"ui_intent": {
"price": "<string>",
"size": "<string>"
}
}
'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": "<string>",
"ui_intent": {
"price": "<string>",
"size": "<string>"
}
}
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: '<string>',
ui_intent: {price: '<string>', size: '<string>'}
})
};
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' => '<string>',
'ui_intent' => [
'price' => '<string>',
'size' => '<string>'
]
]),
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\": \"<string>\",\n \"ui_intent\": {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\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\": \"<string>\",\n \"ui_intent\": {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\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\": \"<string>\",\n \"ui_intent\": {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\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>",
"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>",
"market": "<string>"
}
}{
"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": "<string>",
"ui_intent": {
"price": "<string>",
"size": "<string>"
}
}
'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": "<string>",
"ui_intent": {
"price": "<string>",
"size": "<string>"
}
}
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: '<string>',
ui_intent: {price: '<string>', size: '<string>'}
})
};
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' => '<string>',
'ui_intent' => [
'price' => '<string>',
'size' => '<string>'
]
]),
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\": \"<string>\",\n \"ui_intent\": {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\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\": \"<string>\",\n \"ui_intent\": {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\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\": \"<string>\",\n \"ui_intent\": {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\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>",
"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>",
"market": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json
Available options:
buy, sell Show child attributes
Show child attributes
Response
Accepted order
Show child attributes
Show child attributes
Was this page helpful?
⌘I

