Account (HTTP - Unsigned)
Open Orders
Read live orders, including parked conditional orders.
POST
/
account
Open Orders
curl --request POST \
--url https://mainnet-api1.bulk.trade/api/v1/account \
--header 'Content-Type: application/json' \
--data '
{
"type": "openOrders",
"user": ""
}
'import requests
url = "https://mainnet-api1.bulk.trade/api/v1/account"
payload = {
"type": "openOrders",
"user": ""
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({type: 'openOrders', user: ''})
};
fetch('https://mainnet-api1.bulk.trade/api/v1/account', 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://mainnet-api1.bulk.trade/api/v1/account",
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([
'type' => 'openOrders',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://mainnet-api1.bulk.trade/api/v1/account"
payload := strings.NewReader("{\n \"type\": \"openOrders\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://mainnet-api1.bulk.trade/api/v1/account")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"openOrders\",\n \"user\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet-api1.bulk.trade/api/v1/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"openOrders\",\n \"user\": \"\"\n}"
response = http.request(request)
puts response.read_body[
{
"openOrder": {
"symbol": "BTC-USD",
"orderId": "Fpa3oVuL3UzjNANAMZZdmrn6D1Zhk83GmBuJpuAWG51F",
"price": 99000,
"originalSize": 0.1,
"size": 0.1,
"filledSize": 0,
"vwap": 0,
"maker": true,
"reduceOnly": false,
"orderType": "limit",
"trigger": null,
"tif": "gtc",
"status": "resting",
"timestamp": 1699564800000000000,
"iso": false
}
}
]{
"error": {
"code": "INVALID_HISTORY_QUERY",
"message": "<string>"
}
}<string>"<unknown>"Read live orders, including parked conditional orders. This is an unsigned
POST /account query with
type: "openOrders", not a separate endpoint.
Query target
Use a master or sub-account public key. Attached isolated-account orders are included and identified byiso and isoPubkey.
originalSize and remaining size are signed: positive means buy, negative means sell. filledSize is non-negative. Responses use gtc, ioc, postOnly, postOnlySlide, and postOnlyJoin. This current-state query is not paginated.Body
application/json
⌘I
Open Orders
curl --request POST \
--url https://mainnet-api1.bulk.trade/api/v1/account \
--header 'Content-Type: application/json' \
--data '
{
"type": "openOrders",
"user": ""
}
'import requests
url = "https://mainnet-api1.bulk.trade/api/v1/account"
payload = {
"type": "openOrders",
"user": ""
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({type: 'openOrders', user: ''})
};
fetch('https://mainnet-api1.bulk.trade/api/v1/account', 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://mainnet-api1.bulk.trade/api/v1/account",
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([
'type' => 'openOrders',
'user' => ''
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://mainnet-api1.bulk.trade/api/v1/account"
payload := strings.NewReader("{\n \"type\": \"openOrders\",\n \"user\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://mainnet-api1.bulk.trade/api/v1/account")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"openOrders\",\n \"user\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet-api1.bulk.trade/api/v1/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"openOrders\",\n \"user\": \"\"\n}"
response = http.request(request)
puts response.read_body[
{
"openOrder": {
"symbol": "BTC-USD",
"orderId": "Fpa3oVuL3UzjNANAMZZdmrn6D1Zhk83GmBuJpuAWG51F",
"price": 99000,
"originalSize": 0.1,
"size": 0.1,
"filledSize": 0,
"vwap": 0,
"maker": true,
"reduceOnly": false,
"orderType": "limit",
"trigger": null,
"tif": "gtc",
"status": "resting",
"timestamp": 1699564800000000000,
"iso": false
}
}
]{
"error": {
"code": "INVALID_HISTORY_QUERY",
"message": "<string>"
}
}<string>"<unknown>"