Fetch CCXT orders
curl --request GET \
--url https://testnet.edel-api.xyz/v2/accounts/{accountId}/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://testnet.edel-api.xyz/v2/accounts/{accountId}/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://testnet.edel-api.xyz/v2/accounts/{accountId}/orders', 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.edel-api.xyz/v2/accounts/{accountId}/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.edel-api.xyz/v2/accounts/{accountId}/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.edel-api.xyz/v2/accounts/{accountId}/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.edel-api.xyz/v2/accounts/{accountId}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"symbol": "<string>",
"status": "open",
"info": {
"version": "external-order/v1",
"orderId": "<string>",
"accountId": "<string>",
"marketId": "<string>",
"status": "open",
"lastSequence": 1,
"idempotencyKey": "<string>",
"cancelReason": "margin_unbacked"
},
"clientOrderId": "<string>",
"timestamp": 1,
"datetime": "<string>",
"side": "buy",
"type": "limit",
"timeInForce": "GTC",
"price": 123,
"amount": 1,
"filled": 1,
"remaining": 1,
"reduceOnly": true,
"postOnly": true
}
]{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}CCXT v2
Fetch CCXT orders
Translates CCXT symbol, status, since, and limit over the existing cursor-paged order projection. status=closed covers filled, canceled, and replaced terminal rows.
Method and path: GET /v2/accounts//orders
Authentication: DFNS trader bearer required.
Request schema: none.
Response schema: CcxtV2OrdersResponse.
Error envelope: CcxtV2ErrorResponse (contains ExternalRestError external-rest-error/v1 as info).
GET
/
v2
/
accounts
/
{accountId}
/
orders
Fetch CCXT orders
curl --request GET \
--url https://testnet.edel-api.xyz/v2/accounts/{accountId}/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://testnet.edel-api.xyz/v2/accounts/{accountId}/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://testnet.edel-api.xyz/v2/accounts/{accountId}/orders', 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.edel-api.xyz/v2/accounts/{accountId}/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.edel-api.xyz/v2/accounts/{accountId}/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.edel-api.xyz/v2/accounts/{accountId}/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.edel-api.xyz/v2/accounts/{accountId}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"symbol": "<string>",
"status": "open",
"info": {
"version": "external-order/v1",
"orderId": "<string>",
"accountId": "<string>",
"marketId": "<string>",
"status": "open",
"lastSequence": 1,
"idempotencyKey": "<string>",
"cancelReason": "margin_unbacked"
},
"clientOrderId": "<string>",
"timestamp": 1,
"datetime": "<string>",
"side": "buy",
"type": "limit",
"timeInForce": "GTC",
"price": 123,
"amount": 1,
"filled": 1,
"remaining": 1,
"reduceOnly": true,
"postOnly": true
}
]{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Query Parameters
Optional CCXT perpetual symbol.
Minimum string length:
1Optional inclusive Unix timestamp in integer milliseconds.
Required range:
x >= 0Maximum orders, from 1 to 100. Defaults to 50.
Required range:
x <= 100Optional CCXT unified status. closed includes every terminal Edel status.
Available options:
open, closed, canceled Response
Success
Minimum string length:
1Minimum string length:
1Available options:
open, closed, canceled - Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Minimum string length:
1Required range:
x >= 0Available options:
buy, sell Available options:
limit, market Available options:
GTC, IOC Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0