Create order
curl --request POST \
--url https://api.numofx.com/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>",
"reduce_only": false,
"post_only": false
}
'import requests
url = "https://api.numofx.com/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>",
"reduce_only": False,
"post_only": False
}
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>',
reduce_only: false,
post_only: false
})
};
fetch('https://api.numofx.com/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/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>',
'reduce_only' => false,
'post_only' => false
]),
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/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 \"reduce_only\": false,\n \"post_only\": false\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/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 \"reduce_only\": false,\n \"post_only\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numofx.com/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 \"reduce_only\": false,\n \"post_only\": false\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>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Markets service
Create order
Posts a signed order to the venue’s off-chain matcher. No market maker quotes the futures there, so an order rests until someone crosses it. To trade now, take from the onchain book (Trade on the onchain book guide).
POST
/
orders
Create order
curl --request POST \
--url https://api.numofx.com/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>",
"reduce_only": false,
"post_only": false
}
'import requests
url = "https://api.numofx.com/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>",
"reduce_only": False,
"post_only": False
}
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>',
reduce_only: false,
post_only: false
})
};
fetch('https://api.numofx.com/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/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>',
'reduce_only' => false,
'post_only' => false
]),
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/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 \"reduce_only\": false,\n \"post_only\": false\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/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 \"reduce_only\": false,\n \"post_only\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numofx.com/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 \"reduce_only\": false,\n \"post_only\": false\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>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json
Was this page helpful?

