curl --request GET \
--url https://testnet.derivadex.io/exchange/api/v1/order_updatesimport requests
url = "https://testnet.derivadex.io/exchange/api/v1/order_updates"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.derivadex.io/exchange/api/v1/order_updates', 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://testnet.derivadex.io/exchange/api/v1/order_updates",
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://testnet.derivadex.io/exchange/api/v1/order_updates"
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://testnet.derivadex.io/exchange/api/v1/order_updates")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.derivadex.io/exchange/api/v1/order_updates")
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{
"nextGlobalOrdinal": 100,
"value": [
{
"globalOrdinal": 9,
"epochId": 100,
"reason": 0,
"amount": "1.5",
"symbol": "ETHP",
"makerOrderIntent": {
"epochId": 100,
"orderHash": "0xa3c4c1c18c6e72c4aea8cfa0a1868ac4bc0f9b6463e8c9687f",
"symbol": "ETHP",
"side": 0,
"amount": "1.0",
"price": "1500.0",
"traderAddress": "0x00b993e587c15a9e0a0fe4f111de98fd6b5ce7067d",
"strategyIdHash": "main",
"orderType": 0,
"stopPrice": "0",
"nonce": "0x3136373332393531393331383537373332363800000000000000000000000000",
"signature": "0xf9b19b088e3d0ad2c6330231899e03e50b45a8c7a1f52082aa0e9a61391fd5a35d3aece9dd2d42132a25b0aef5ac1bda7aee87c0c0c25ab9525d5eeeff9787d81b",
"createdAt": "2023-01-06T16:37:27.929Z"
},
"createdAt": "2023-01-06T16:37:27.929Z",
"txOrdinal": 3432,
"ordinal": 0,
"orderRejection": 0,
"cancelRejection": 0,
"quoteAssetAmount": "750",
"price": "500",
"makerFeeCollateral": "0",
"makerFeeDDX": "0",
"makerRealizedPnl": "0",
"takerOrderIntent": {
"epochId": 100,
"orderHash": "0xa3c4c1c18c6e72c4aea8cfa0a1868ac4bc0f9b6463e8c9687f",
"symbol": "ETHP",
"side": 0,
"amount": "1.0",
"price": "1500.0",
"traderAddress": "0x00b993e587c15a9e0a0fe4f111de98fd6b5ce7067d",
"strategyIdHash": "main",
"orderType": 0,
"stopPrice": "0",
"nonce": "0x3136373332393531393331383537373332363800000000000000000000000000",
"signature": "0xf9b19b088e3d0ad2c6330231899e03e50b45a8c7a1f52082aa0e9a61391fd5a35d3aece9dd2d42132a25b0aef5ac1bda7aee87c0c0c25ab9525d5eeeff9787d81b",
"createdAt": "2023-01-06T16:37:27.929Z"
},
"takerFeeCollateral": "1.7874",
"takerFeeDDX": "1.7874",
"takerRealizedPnl": "0",
"liquidatedTraderAddress": null,
"liquidatedStrategyIdHash": null
}
],
"success": true,
"timestamp": 1673031089
}{
"success": false,
"errorMsg": "<string>"
}{
"success": false,
"errorMsg": "<string>"
}Get Order Update History
Get order updates (trades, liquidations, cancels)
curl --request GET \
--url https://testnet.derivadex.io/exchange/api/v1/order_updatesimport requests
url = "https://testnet.derivadex.io/exchange/api/v1/order_updates"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.derivadex.io/exchange/api/v1/order_updates', 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://testnet.derivadex.io/exchange/api/v1/order_updates",
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://testnet.derivadex.io/exchange/api/v1/order_updates"
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://testnet.derivadex.io/exchange/api/v1/order_updates")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.derivadex.io/exchange/api/v1/order_updates")
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{
"nextGlobalOrdinal": 100,
"value": [
{
"globalOrdinal": 9,
"epochId": 100,
"reason": 0,
"amount": "1.5",
"symbol": "ETHP",
"makerOrderIntent": {
"epochId": 100,
"orderHash": "0xa3c4c1c18c6e72c4aea8cfa0a1868ac4bc0f9b6463e8c9687f",
"symbol": "ETHP",
"side": 0,
"amount": "1.0",
"price": "1500.0",
"traderAddress": "0x00b993e587c15a9e0a0fe4f111de98fd6b5ce7067d",
"strategyIdHash": "main",
"orderType": 0,
"stopPrice": "0",
"nonce": "0x3136373332393531393331383537373332363800000000000000000000000000",
"signature": "0xf9b19b088e3d0ad2c6330231899e03e50b45a8c7a1f52082aa0e9a61391fd5a35d3aece9dd2d42132a25b0aef5ac1bda7aee87c0c0c25ab9525d5eeeff9787d81b",
"createdAt": "2023-01-06T16:37:27.929Z"
},
"createdAt": "2023-01-06T16:37:27.929Z",
"txOrdinal": 3432,
"ordinal": 0,
"orderRejection": 0,
"cancelRejection": 0,
"quoteAssetAmount": "750",
"price": "500",
"makerFeeCollateral": "0",
"makerFeeDDX": "0",
"makerRealizedPnl": "0",
"takerOrderIntent": {
"epochId": 100,
"orderHash": "0xa3c4c1c18c6e72c4aea8cfa0a1868ac4bc0f9b6463e8c9687f",
"symbol": "ETHP",
"side": 0,
"amount": "1.0",
"price": "1500.0",
"traderAddress": "0x00b993e587c15a9e0a0fe4f111de98fd6b5ce7067d",
"strategyIdHash": "main",
"orderType": 0,
"stopPrice": "0",
"nonce": "0x3136373332393531393331383537373332363800000000000000000000000000",
"signature": "0xf9b19b088e3d0ad2c6330231899e03e50b45a8c7a1f52082aa0e9a61391fd5a35d3aece9dd2d42132a25b0aef5ac1bda7aee87c0c0c25ab9525d5eeeff9787d81b",
"createdAt": "2023-01-06T16:37:27.929Z"
},
"takerFeeCollateral": "1.7874",
"takerFeeDDX": "1.7874",
"takerRealizedPnl": "0",
"liquidatedTraderAddress": null,
"liquidatedStrategyIdHash": null
}
],
"success": true,
"timestamp": 1673031089
}{
"success": false,
"errorMsg": "<string>"
}{
"success": false,
"errorMsg": "<string>"
}Query Parameters
The trader address, with the discriminant prefix.
The strategy id hash.
The number of rows to return
The global ordinal boundary used when fetching the next timeseries page.
The ordering of the results.
asc, desc The symbol
the order hash of the order intent. Multiple order hash values can be provided.
"0xe30f69fffa653b9cb7d4e90f099fe12ea21c5ff8e97f7854dd"
The reason for the creation of this row. Multiple reason values can be provided. Values include: 0-Post; 1-Trade; 2-Liquidation; 3-Cancel, 4-Order Rejection, 5-Cancel Rejection.
The earliest time in seconds to fetch rows for. This param cannot be used together with param order = 'desc'
Response
Order update data
Successful response for the Order Update API
Pointer for the global ordinal boundary of the next page. Will return null when there is no more data left to fetch.
100
null
The value of the response
Show child attributes
Show child attributes
Whether the request was successful
The timestamp of the response
1673031089