Get Trade by ID
curl --request GET \
--url https://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}import requests
url = "https://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}', 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://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}",
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://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}"
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://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}")
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{
"data": {
"executedAt": "2023-11-13T10:30:00Z",
"makerSide": "BUY",
"price": "35000.00",
"quantity": "0.5",
"quantityRaw": "50000000",
"tradeId": "123e4567-e89b-12d3-a456-426614174000"
},
"eventType": "trade",
"tradingPairId": "456e7890-e12b-12d3-a456-426614174000",
"tradingMode": "SPOT"
}Trades
Get Trade by ID
Get Trade by ID
Retrieve a single trade by its unique identifier.
GET
/
api
/
v1
/
trades
/
by-id
/
{tradeId}
Get Trade by ID
curl --request GET \
--url https://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}import requests
url = "https://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}', 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://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}",
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://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}"
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://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.apimonaco.xyz/api/v1/trades/by-id/{tradeId}")
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{
"data": {
"executedAt": "2023-11-13T10:30:00Z",
"makerSide": "BUY",
"price": "35000.00",
"quantity": "0.5",
"quantityRaw": "50000000",
"tradeId": "123e4567-e89b-12d3-a456-426614174000"
},
"eventType": "trade",
"tradingPairId": "456e7890-e12b-12d3-a456-426614174000",
"tradingMode": "SPOT"
}Path Parameters
Response
OK
A single trade.
Core fields of a single executed trade, nested under data in the public trade event envelope.
Show child attributes
Show child attributes
Event type identifier
Example:
"trade"
Trading pair UUID
Example:
"456e7890-e12b-12d3-a456-426614174000"
Trading mode: SPOT or MARGIN
Example:
"SPOT"
Was this page helpful?

