Get recent trades
curl --request GET \
--url https://api.numofx.com/v1/tradesimport requests
url = "https://api.numofx.com/v1/trades"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.numofx.com/v1/trades', 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/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.numofx.com/v1/trades"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.numofx.com/v1/trades")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numofx.com/v1/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"market_presentation": {
"market": "<string>",
"contract_type": "<string>",
"settlement_type": "<string>",
"base_asset_symbol": "<string>",
"quote_asset_symbol": "<string>",
"expiry_timestamp": 123,
"display_name": "<string>",
"display_label": "<string>",
"tick_size": "<string>",
"settlement_note": "<string>",
"asset_address": "<string>",
"sub_id": "<string>",
"order_entry_spec": "<string>"
},
"stats_24h": {
"change": "<string>",
"high": "<string>",
"last": "<string>",
"low": "<string>",
"volume": "<string>"
},
"trades": [
{
"trade_id": 123,
"asset_address": "<string>",
"sub_id": "<string>",
"price": "<string>",
"size": "<string>",
"aggressor_side": "<string>",
"taker_order_id": "<string>",
"maker_order_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"market": "<string>"
}
],
"next_before_trade_id": 123
}Markets service
Get trades
GET
/
v1
/
trades
Get recent trades
curl --request GET \
--url https://api.numofx.com/v1/tradesimport requests
url = "https://api.numofx.com/v1/trades"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.numofx.com/v1/trades', 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/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.numofx.com/v1/trades"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.numofx.com/v1/trades")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numofx.com/v1/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"market_presentation": {
"market": "<string>",
"contract_type": "<string>",
"settlement_type": "<string>",
"base_asset_symbol": "<string>",
"quote_asset_symbol": "<string>",
"expiry_timestamp": 123,
"display_name": "<string>",
"display_label": "<string>",
"tick_size": "<string>",
"settlement_note": "<string>",
"asset_address": "<string>",
"sub_id": "<string>",
"order_entry_spec": "<string>"
},
"stats_24h": {
"change": "<string>",
"high": "<string>",
"last": "<string>",
"low": "<string>",
"volume": "<string>"
},
"trades": [
{
"trade_id": 123,
"asset_address": "<string>",
"sub_id": "<string>",
"price": "<string>",
"size": "<string>",
"aggressor_side": "<string>",
"taker_order_id": "<string>",
"maker_order_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"market": "<string>"
}
],
"next_before_trade_id": 123
}Query Parameters
Required range:
1 <= x <= 100Required range:
x >= 1Was this page helpful?
⌘I

