curl --request POST \
--url https://data-api-dev.voxfi.com.br/v1/trade/order \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"market_id": "08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48",
"order_type": "LIMIT_BUY",
"outcome": "YES",
"price_ticks": 27,
"quantity": 100,
"value_cents": 10000
}
'import requests
url = "https://data-api-dev.voxfi.com.br/v1/trade/order"
payload = {
"market_id": "08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48",
"order_type": "LIMIT_BUY",
"outcome": "YES",
"price_ticks": 27,
"quantity": 100,
"value_cents": 10000
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
market_id: '08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48',
order_type: 'LIMIT_BUY',
outcome: 'YES',
price_ticks: 27,
quantity: 100,
value_cents: 10000
})
};
fetch('https://data-api-dev.voxfi.com.br/v1/trade/order', 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://data-api-dev.voxfi.com.br/v1/trade/order",
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([
'market_id' => '08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48',
'order_type' => 'LIMIT_BUY',
'outcome' => 'YES',
'price_ticks' => 27,
'quantity' => 100,
'value_cents' => 10000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$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://data-api-dev.voxfi.com.br/v1/trade/order"
payload := strings.NewReader("{\n \"market_id\": \"08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48\",\n \"order_type\": \"LIMIT_BUY\",\n \"outcome\": \"YES\",\n \"price_ticks\": 27,\n \"quantity\": 100,\n \"value_cents\": 10000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-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))
}HttpResponse<String> response = Unirest.post("https://data-api-dev.voxfi.com.br/v1/trade/order")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"market_id\": \"08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48\",\n \"order_type\": \"LIMIT_BUY\",\n \"outcome\": \"YES\",\n \"price_ticks\": 27,\n \"quantity\": 100,\n \"value_cents\": 10000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api-dev.voxfi.com.br/v1/trade/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market_id\": \"08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48\",\n \"order_type\": \"LIMIT_BUY\",\n \"outcome\": \"YES\",\n \"price_ticks\": 27,\n \"quantity\": 100,\n \"value_cents\": 10000\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"order_id": 123,
"success": true,
"order_status": "<string>",
"timestamp": "<string>",
"wanted": 123,
"filled": 123,
"filled_amount": 123,
"remaining": 123
}{}{}{}{}{}Place Order
Place a unified order (LIMIT_BUY, LIMIT_SELL, MARKET_BUY_VALUE, MARKET_BUY_QTY, MARKET_SELL)
curl --request POST \
--url https://data-api-dev.voxfi.com.br/v1/trade/order \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"market_id": "08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48",
"order_type": "LIMIT_BUY",
"outcome": "YES",
"price_ticks": 27,
"quantity": 100,
"value_cents": 10000
}
'import requests
url = "https://data-api-dev.voxfi.com.br/v1/trade/order"
payload = {
"market_id": "08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48",
"order_type": "LIMIT_BUY",
"outcome": "YES",
"price_ticks": 27,
"quantity": 100,
"value_cents": 10000
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
market_id: '08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48',
order_type: 'LIMIT_BUY',
outcome: 'YES',
price_ticks: 27,
quantity: 100,
value_cents: 10000
})
};
fetch('https://data-api-dev.voxfi.com.br/v1/trade/order', 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://data-api-dev.voxfi.com.br/v1/trade/order",
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([
'market_id' => '08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48',
'order_type' => 'LIMIT_BUY',
'outcome' => 'YES',
'price_ticks' => 27,
'quantity' => 100,
'value_cents' => 10000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$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://data-api-dev.voxfi.com.br/v1/trade/order"
payload := strings.NewReader("{\n \"market_id\": \"08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48\",\n \"order_type\": \"LIMIT_BUY\",\n \"outcome\": \"YES\",\n \"price_ticks\": 27,\n \"quantity\": 100,\n \"value_cents\": 10000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-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))
}HttpResponse<String> response = Unirest.post("https://data-api-dev.voxfi.com.br/v1/trade/order")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"market_id\": \"08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48\",\n \"order_type\": \"LIMIT_BUY\",\n \"outcome\": \"YES\",\n \"price_ticks\": 27,\n \"quantity\": 100,\n \"value_cents\": 10000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api-dev.voxfi.com.br/v1/trade/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market_id\": \"08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48\",\n \"order_type\": \"LIMIT_BUY\",\n \"outcome\": \"YES\",\n \"price_ticks\": 27,\n \"quantity\": 100,\n \"value_cents\": 10000\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"order_id": 123,
"success": true,
"order_status": "<string>",
"timestamp": "<string>",
"wanted": 123,
"filled": 123,
"filled_amount": 123,
"remaining": 123
}{}{}{}{}{}Cabeçalhos
API Key
Corpo
Place Order Input
"08e1fcc2-6c1d-41f7-aec4-f2aa4d83cd48"
"LIMIT", "LIMIT_BUY", "LIMIT_SELL", "MARKET_BUY_VALUE", "MARKET_BUY_QTY", "MARKET_SELL"
"LIMIT_BUY"
"YES" or "NO"
"YES"
price in ticks (0-100) - For LIMIT orders (optional when using LIMIT_BUY or LIMIT_SELL)
27
number of contracts - For quantity-based orders (LIMIT_BUY, LIMIT_SELL, MARKET_BUY_QTY, MARKET_SELL)
100
maximum value to spend in cents - For MARKET_BUY_VALUE
10000
Resposta
OK
Order ID
Status of the order. One of "PLACED", "PARTIALLY_FILLED", "FILLED", "FAILED"
Timestamp of the order (RFC3339)
Wanted quantity of contracts
Filled quantity of contracts
Filled amount in cents
Remaining quantity of contracts

