curl -X POST "$API/emm/orders/place" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"outcomeId": "123e4567-e89b-12d3-a456-426614174000",
"price": 0.125,
"qty": 4200,
"currency": COIN,
"tif": "GTC"
}'import requests
url = "https://api.novig.com/nbx/v2/emm/orders/place"
payload = {
"outcomeId": "123e4567-e89b-12d3-a456-426614174000",
"price": 0.667,
"qty": 110,
"currency": "CASH",
"tif": "GTC",
"ttl": 2400,
"flags": "ABC12345"
}
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({
outcomeId: '123e4567-e89b-12d3-a456-426614174000',
price: 0.667,
qty: 110,
currency: 'CASH',
tif: 'GTC',
ttl: 2400,
flags: 'ABC12345'
})
};
fetch('https://api.novig.com/nbx/v2/emm/orders/place', 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.novig.com/nbx/v2/emm/orders/place",
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([
'outcomeId' => '123e4567-e89b-12d3-a456-426614174000',
'price' => 0.667,
'qty' => 110,
'currency' => 'CASH',
'tif' => 'GTC',
'ttl' => 2400,
'flags' => 'ABC12345'
]),
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.novig.com/nbx/v2/emm/orders/place"
payload := strings.NewReader("{\n \"outcomeId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"price\": 0.667,\n \"qty\": 110,\n \"currency\": \"CASH\",\n \"tif\": \"GTC\",\n \"ttl\": 2400,\n \"flags\": \"ABC12345\"\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.novig.com/nbx/v2/emm/orders/place")
.header("Content-Type", "application/json")
.body("{\n \"outcomeId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"price\": 0.667,\n \"qty\": 110,\n \"currency\": \"CASH\",\n \"tif\": \"GTC\",\n \"ttl\": 2400,\n \"flags\": \"ABC12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novig.com/nbx/v2/emm/orders/place")
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 \"outcomeId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"price\": 0.667,\n \"qty\": 110,\n \"currency\": \"CASH\",\n \"tif\": \"GTC\",\n \"ttl\": 2400,\n \"flags\": \"ABC12345\"\n}"
response = http.request(request)
puts response.read_bodyPlace order
Place an order into the matching engine queue, conditional on validation. A successful response indicates that the order was placed in the queue, but does not guarantee that it will be filled or placed on the order book. To reliably ensure that an order has been executed, consume messages from the matching tape to reconstruct the order book and other stateful structures.
Note: If an order placed wash trades against an order from the same user, both orders will wash fill each other and effectively be cancelled.
Rate limit: 32 requests per second.
curl -X POST "$API/emm/orders/place" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"outcomeId": "123e4567-e89b-12d3-a456-426614174000",
"price": 0.125,
"qty": 4200,
"currency": COIN,
"tif": "GTC"
}'import requests
url = "https://api.novig.com/nbx/v2/emm/orders/place"
payload = {
"outcomeId": "123e4567-e89b-12d3-a456-426614174000",
"price": 0.667,
"qty": 110,
"currency": "CASH",
"tif": "GTC",
"ttl": 2400,
"flags": "ABC12345"
}
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({
outcomeId: '123e4567-e89b-12d3-a456-426614174000',
price: 0.667,
qty: 110,
currency: 'CASH',
tif: 'GTC',
ttl: 2400,
flags: 'ABC12345'
})
};
fetch('https://api.novig.com/nbx/v2/emm/orders/place', 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.novig.com/nbx/v2/emm/orders/place",
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([
'outcomeId' => '123e4567-e89b-12d3-a456-426614174000',
'price' => 0.667,
'qty' => 110,
'currency' => 'CASH',
'tif' => 'GTC',
'ttl' => 2400,
'flags' => 'ABC12345'
]),
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.novig.com/nbx/v2/emm/orders/place"
payload := strings.NewReader("{\n \"outcomeId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"price\": 0.667,\n \"qty\": 110,\n \"currency\": \"CASH\",\n \"tif\": \"GTC\",\n \"ttl\": 2400,\n \"flags\": \"ABC12345\"\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.novig.com/nbx/v2/emm/orders/place")
.header("Content-Type", "application/json")
.body("{\n \"outcomeId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"price\": 0.667,\n \"qty\": 110,\n \"currency\": \"CASH\",\n \"tif\": \"GTC\",\n \"ttl\": 2400,\n \"flags\": \"ABC12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novig.com/nbx/v2/emm/orders/place")
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 \"outcomeId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"price\": 0.667,\n \"qty\": 110,\n \"currency\": \"CASH\",\n \"tif\": \"GTC\",\n \"ttl\": 2400,\n \"flags\": \"ABC12345\"\n}"
response = http.request(request)
puts response.read_bodyBody
The server-generated UUID of the outcome for which the order will increase exposure
"123e4567-e89b-12d3-a456-426614174000"
The price of the order in decimal probability, up to 3 decimal places
0.667
The number of minimal currency units for the order. Note that this must be a positive integer. For CASH orders, 1 unit = 0.01 Novig Cash (e.g., 100 units = 1.00 Cash). For COIN orders, 1 unit = 1 Novig Coin
110
Denomination of the order, i.e. CASH or COIN
"CASH"
GTC, GTT, IOC, FOK, or PO (default is GTC). PO (post only) rejects the order instead of matching it immediately as a taker, so it only ever rests as a maker order.
"GTC"
Time to live for the order (milliseconds) after which the order will be automatically canceled if not totally filled. Required under GTT time-in-force; optional under PO, where it self-expires if provided and otherwise rests until canceled
2400
Custom 8-character string field for storing trader-specified flags or metadata about the order
8"ABC12345"
Response
Order placed successfully