REST API Reference
SubmitOrder
Place a limit order.
Request
orderobjectThe order to place.
+ Show 6 properties
sideenumSide to place on.
ASKSell the base asset.BIDBuy the base asset.market_idstringuint64Market to place on.
qtystringint64Quantity to place, a multiple of the market's step size. Must be positive except on a cancel lambda.
ticksintegerint32Limit price in ticks, from 1 to the market's max_ticks.
tifenumHow long the order stays live.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.is_leveragebooleanTrade on margin. Currently disabled.
client_order_idstringOptionalClient-supplied id, at most 36 bytes. Rejected if it matches another of the account's live orders.
Response
A successful response.
order_idstringExchange-assigned order id.
curl -X POST 'https://api.pax.markets/v1/order/submit' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"client_order_id": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/order/submit"
body = json.dumps({
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": False
},
"client_order_id": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/order/submit";
let body = serde_json::to_string(&serde_json::json!({
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"client_order_id": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/order/submit";
const body = JSON.stringify({
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"client_order_id": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"order_id": "string"
}CancelLiquidityOrder
Cancel a quantity of the account's resting liquidity at one price level.
Request
market_idstringuint64Market to cancel on.
qtystringint64Quantity to cancel. Must be positive.
sideenumSide to cancel on.
ASKSell the base asset.BIDBuy the base asset.ticksintegerint32Price level to cancel at, in ticks.
client_order_idstringOptionalClient-supplied id for the cancel, at most 36 bytes.
Response
A successful response.
order_idstringExchange-assigned id of the cancel order.
curl -X POST 'https://api.pax.markets/v1/order/cancel-liquidity' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"market_id": "0",
"qty": "0",
"side": 1,
"ticks": 0,
"client_order_id": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/order/cancel-liquidity"
body = json.dumps({
"market_id": "0",
"qty": "0",
"side": 1,
"ticks": 0,
"client_order_id": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/order/cancel-liquidity";
let body = serde_json::to_string(&serde_json::json!({
"market_id": "0",
"qty": "0",
"side": 1,
"ticks": 0,
"client_order_id": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/order/cancel-liquidity";
const body = JSON.stringify({
"market_id": "0",
"qty": "0",
"side": 1,
"ticks": 0,
"client_order_id": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"order_id": "string"
}CancelAllOrders
Cancel every resting order for the account, optionally limited to one market.
Request
market_idstringuint64OptionalCancel only this market's orders. Omit for every market.
Response
A successful response.
order_idsstring[]List of exchange-assigned cancel order ids, one per order canceled.
curl -X POST 'https://api.pax.markets/v1/order/cancel-all' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"market_id": "0"
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/order/cancel-all"
body = json.dumps({
"market_id": "0"
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/order/cancel-all";
let body = serde_json::to_string(&serde_json::json!({
"market_id": "0"
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/order/cancel-all";
const body = JSON.stringify({
"market_id": "0"
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"order_ids": []
}BatchSubmitOmniOrders
Place orders and cancel liquidity in one request. Entries that fail validation or are rejected are skipped rather than failing the batch.
Request
omni_ordersobject[]OptionalList of entries to apply, in the order given. At most 40 per request.
+ Show 2 properties
message.SubmitOrderobjectOne ofPlace an order.
+ Show 2 properties
orderobjectThe order to place.
+ Show 6 properties
sideenumSide to place on.
ASKSell the base asset.BIDBuy the base asset.market_idstringuint64Market to place on.
qtystringint64Quantity to place, a multiple of the market's step size. Must be positive except on a cancel lambda.
ticksintegerint32Limit price in ticks, from 1 to the market's max_ticks.
tifenumHow long the order stays live.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.is_leveragebooleanTrade on margin. Currently disabled.
client_order_idstringOptionalClient-supplied id, at most 36 bytes. Rejected if it matches another of the account's live orders.
message.CancelLiquidityOrderobjectOne ofCancel resting liquidity at a price level.
+ Show 5 properties
market_idstringuint64Market to cancel on.
qtystringint64Quantity to cancel. Must be positive.
sideenumSide to cancel on.
ASKSell the base asset.BIDBuy the base asset.ticksintegerint32Price level to cancel at, in ticks.
client_order_idstringOptionalClient-supplied id for the cancel, at most 36 bytes.
Response
A successful response.
resultsobject[]List of results, one per accepted entry, in request order. Skipped entries are absent; send a client_order_id on each entry to match results to entries.
+ Show 2 properties
order_idstringExchange-assigned order id.
client_order_idstringThe entry's client_order_id. Empty if none was sent.
curl -X POST 'https://api.pax.markets/v1/order/submit-batch-omni' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"omni_orders": [
{
"message": {
"SubmitOrder": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"client_order_id": ""
}
}
},
{
"message": {
"CancelLiquidityOrder": {
"market_id": "0",
"qty": "0",
"side": 1,
"ticks": 0,
"client_order_id": ""
}
}
}
]
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/order/submit-batch-omni"
body = json.dumps({
"omni_orders": [
{
"message": {
"SubmitOrder": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": False
},
"client_order_id": ""
}
}
},
{
"message": {
"CancelLiquidityOrder": {
"market_id": "0",
"qty": "0",
"side": 1,
"ticks": 0,
"client_order_id": ""
}
}
}
]
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/order/submit-batch-omni";
let body = serde_json::to_string(&serde_json::json!({
"omni_orders": [
{
"message": {
"SubmitOrder": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"client_order_id": ""
}
}
},
{
"message": {
"CancelLiquidityOrder": {
"market_id": "0",
"qty": "0",
"side": 1,
"ticks": 0,
"client_order_id": ""
}
}
}
]
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/order/submit-batch-omni";
const body = JSON.stringify({
"omni_orders": [
{
"message": {
"SubmitOrder": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"client_order_id": ""
}
}
},
{
"message": {
"CancelLiquidityOrder": {
"market_id": "0",
"qty": "0",
"side": 1,
"ticks": 0,
"client_order_id": ""
}
}
}
]
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"results": [
{
"order_id": "",
"client_order_id": ""
}
]
}GetActiveOrders
List the account's open orders, whether pending or resting.
Request
market_idstringuint64OptionalReturn only orders on this market. Omit for every market.
Response
A successful response.
ordersobject[]List of the account's open orders.
+ Show 6 properties
order_idstringExchange-assigned order id.
client_order_idstringThe order's client_order_id. Empty if none was sent.
orderobjectThe order as placed.
+ Show 6 properties
sideenumSide the order was placed on.
ASKSell the base asset.BIDBuy the base asset.market_idstringuint64Market the order was placed on.
qtystringint64Quantity submitted. Negative for a cancel order.
ticksintegerint32Limit price in ticks.
tifenumTime in force the order was placed with.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.originenumWhat placed the order.
EXOGENOUSPlaced directly through the API.LAMBDAPlaced by a lambda program.ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.qty_filled_makestringint64Quantity filled as maker so far.
qty_filled_takestringint64Quantity filled as taker so far.
qty_canceledstringint64Quantity canceled so far.
curl -X GET 'https://api.pax.markets/v1/order/active' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/order/active"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/order/active";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/order/active";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"orders": [
{
"order_id": "",
"client_order_id": "",
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"origin": 1
},
"qty_filled_make": "0",
"qty_filled_take": "0",
"qty_canceled": "0"
}
]
}GetOrder
Fetch one order by order_id.
Path Parameters
order_idstringId of the order to fetch.
Response
A successful response.
order_idstringExchange-assigned order id.
market_idstringuint64Market the order was placed on.
sideenumSide the order was placed on.
ASKSell the base asset.BIDBuy the base asset.qtystringint64Quantity submitted. Negative for a cancel order.
ticksintegerint32Limit price in ticks.
tifenumTime in force the order was placed with.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.order_statusenumCurrent status.
ORDER_STATUS_PENDINGAccepted, not yet acknowledged by the matching engine.ORDER_STATUS_RESTINGOn the book with quantity left to fill.ORDER_STATUS_FILLEDFully filled.ORDER_STATUS_CANCELEDCanceled with nothing filled.ORDER_STATUS_PARTIALPartly filled, with the rest canceled.ORDER_STATUS_REJECTEDRefused.originenumWhat placed the order.
EXOGENOUSPlaced directly through the API.LAMBDAPlaced by a lambda program.ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.qty_filled_makestringint64Quantity filled as maker.
qty_filled_takestringint64Quantity filled as taker.
qty_canceledstringint64Quantity canceled.
fill_valuestringint64Total value filled, in the quote asset's native units.
client_order_idstringClient-supplied id from the submit request.
created_time_msstringint64When the order was accepted, in Unix milliseconds.
updated_time_msstringint64When the order last changed, in Unix milliseconds.
curl -X GET 'https://api.pax.markets/v1/order/{order_id}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/order/{order_id}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/order/{order_id}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/order/{order_id}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"order_id": "string",
"market_id": "0",
"side": 1,
"qty": "0",
"ticks": 42,
"tif": 1,
"order_status": 1,
"origin": 1,
"qty_filled_make": "0",
"qty_filled_take": "0",
"qty_canceled": "0",
"fill_value": "0",
"client_order_id": "string",
"created_time_ms": "0",
"updated_time_ms": "0"
}GetOrders
List the account's orders, newest first, optionally narrowed to one market and one status.
Request
limitintegerint32OptionalMaximum orders to return, from 1 to 1000. Defaults to 1000.
cursorstringOptionalCursor from the previous response's next_cursor. Omit for the first page.
order_statusenumOptionalReturn only orders in this status.
ORDER_STATUS_PENDINGAccepted, not yet acknowledged by the matching engine.ORDER_STATUS_RESTINGOn the book with quantity left to fill.ORDER_STATUS_FILLEDFully filled.ORDER_STATUS_CANCELEDCanceled with nothing filled.ORDER_STATUS_PARTIALPartly filled, with the rest canceled.ORDER_STATUS_REJECTEDRefused.market_idstringuint64OptionalReturn only orders on this market. Omit for every market.
Response
A successful response.
ordersobject[]List of orders on this page.
+ Show 15 properties
order_idstringExchange-assigned order id.
market_idstringuint64Market the order was placed on.
sideenumSide the order was placed on.
ASKSell the base asset.BIDBuy the base asset.qtystringint64Quantity submitted. Negative for a cancel order.
ticksintegerint32Limit price in ticks.
tifenumTime in force the order was placed with.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.order_statusenumCurrent status.
ORDER_STATUS_PENDINGAccepted, not yet acknowledged by the matching engine.ORDER_STATUS_RESTINGOn the book with quantity left to fill.ORDER_STATUS_FILLEDFully filled.ORDER_STATUS_CANCELEDCanceled with nothing filled.ORDER_STATUS_PARTIALPartly filled, with the rest canceled.ORDER_STATUS_REJECTEDRefused.originenumWhat placed the order.
EXOGENOUSPlaced directly through the API.LAMBDAPlaced by a lambda program.ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.qty_filled_makestringint64Quantity filled as maker.
qty_filled_takestringint64Quantity filled as taker.
qty_canceledstringint64Quantity canceled.
fill_valuestringint64Total value filled, in the quote asset's native units.
client_order_idstringClient-supplied id from the submit request.
created_time_msstringint64When the order was accepted, in Unix milliseconds.
updated_time_msstringint64When the order last changed, in Unix milliseconds.
next_cursorstringPass as cursor to fetch the next page. Absent on the last page.
curl -X GET 'https://api.pax.markets/v1/order/list' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/order/list"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/order/list";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/order/list";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"orders": [
{
"order_id": "",
"market_id": "0",
"side": 1,
"qty": "0",
"ticks": 0,
"tif": 1,
"order_status": 1,
"origin": 1,
"qty_filled_make": "0",
"qty_filled_take": "0",
"qty_canceled": "0",
"fill_value": "0",
"client_order_id": "",
"created_time_ms": "0",
"updated_time_ms": "0"
}
],
"next_cursor": "string"
}GetOrderStatusUpdates
Read the full status update history of one order. Updates can take up to 15 minutes to appear here.
Request
order_idstringOrder whose history to read.
limitintegerint32OptionalMaximum updates to return, from 1 to 1000. Defaults to 1000.
cursorstringOptionalCursor from the previous response's next_cursor. Omit for the first page.
Response
A successful response.
order_status_updatesobject[]List of status updates on this page.
+ Show 2 properties
osuobjectThe status update, as streamed.
+ Show 11 properties
osu_idstringId of this status update. Empty when the order was rejected before an update id was assigned.
order_idstringOrder this update belongs to. Empty when the order was rejected before an order id was assigned.
client_order_idstringThe order's client_order_id. Empty if none was sent.
qty_filled_makestringint64Quantity filled as maker in this update.
qty_filled_takestringint64Quantity filled as taker in this update.
qty_canceledstringint64Quantity canceled in this update.
fill_valuestringint64Value filled in this update, in the quote asset's native units.
fee_rebatestringint64Rebate paid, or fee charged when negative, in the quote asset's native units.
orderobjectThe order as placed.
+ Show 6 properties
sideenumSide the order was placed on.
ASKSell the base asset.BIDBuy the base asset.market_idstringuint64Market the order was placed on.
qtystringint64Quantity submitted. Negative for a cancel order.
ticksintegerint32Limit price in ticks.
tifenumTime in force the order was placed with.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.originenumWhat placed the order.
EXOGENOUSPlaced directly through the API.LAMBDAPlaced by a lambda program.ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.order_statusenumOrder status after this update.
ORDER_STATUS_PENDINGAccepted, not yet acknowledged by the matching engine.ORDER_STATUS_RESTINGOn the book with quantity left to fill.ORDER_STATUS_FILLEDFully filled.ORDER_STATUS_CANCELEDCanceled with nothing filled.ORDER_STATUS_PARTIALPartly filled, with the rest canceled.ORDER_STATUS_REJECTEDRefused.reasonenumWhy the system refused or canceled the order, if it did.
OSU_REASON_UNSPECIFIEDNo system reason.OSU_REASON_ADMIN_CANCELEDCanceled by the system, such as ahead of maintenance or shutdown.OSU_REASON_INSUFFICIENT_BALANCERefused: the account cannot fund the order.OSU_REASON_DUPLICATE_CLIENT_IDRefused: client_order_id is already in use by a live order.OSU_REASON_EXCHANGE_ERRORRefused: the exchange could not accept the order.updated_time_msstringint64When this update happened, in Unix milliseconds.
next_cursorstringPass as cursor to fetch the next page. Absent on the last page.
curl -X GET 'https://api.pax.markets/v1/order/status-updates?order_id=<order_id>' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/order/status-updates?order_id=<order_id>"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/order/status-updates?order_id=<order_id>";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/order/status-updates?order_id=<order_id>";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"order_status_updates": [
{
"osu": {
"osu_id": "",
"order_id": "",
"client_order_id": "",
"qty_filled_make": "0",
"qty_filled_take": "0",
"qty_canceled": "0",
"fill_value": "0",
"fee_rebate": "0",
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"origin": 1
},
"order_status": 1,
"reason": 0
},
"updated_time_ms": "0"
}
],
"next_cursor": "string"
}GetRecentFillOrderStatusUpdates
Read the account's most recent fills, newest first. A fill is any status update that fills or cancels quantity. Covers the last 10,000 fills per account.
Request
market_idstringuint64OptionalReturn only updates for orders on this market.
limitintegerint32OptionalMaximum updates to return, from 1 to 1000. Defaults to 1000.
cursorstringOptionalCursor from the previous response's next_cursor. Omit to start at the newest update.
Response
A successful response.
order_status_updatesobject[]List of status updates on this page.
+ Show 2 properties
osuobjectThe status update, as streamed.
+ Show 11 properties
osu_idstringId of this status update. Empty when the order was rejected before an update id was assigned.
order_idstringOrder this update belongs to. Empty when the order was rejected before an order id was assigned.
client_order_idstringThe order's client_order_id. Empty if none was sent.
qty_filled_makestringint64Quantity filled as maker in this update.
qty_filled_takestringint64Quantity filled as taker in this update.
qty_canceledstringint64Quantity canceled in this update.
fill_valuestringint64Value filled in this update, in the quote asset's native units.
fee_rebatestringint64Rebate paid, or fee charged when negative, in the quote asset's native units.
orderobjectThe order as placed.
+ Show 6 properties
sideenumSide the order was placed on.
ASKSell the base asset.BIDBuy the base asset.market_idstringuint64Market the order was placed on.
qtystringint64Quantity submitted. Negative for a cancel order.
ticksintegerint32Limit price in ticks.
tifenumTime in force the order was placed with.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.originenumWhat placed the order.
EXOGENOUSPlaced directly through the API.LAMBDAPlaced by a lambda program.ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.order_statusenumOrder status after this update.
ORDER_STATUS_PENDINGAccepted, not yet acknowledged by the matching engine.ORDER_STATUS_RESTINGOn the book with quantity left to fill.ORDER_STATUS_FILLEDFully filled.ORDER_STATUS_CANCELEDCanceled with nothing filled.ORDER_STATUS_PARTIALPartly filled, with the rest canceled.ORDER_STATUS_REJECTEDRefused.reasonenumWhy the system refused or canceled the order, if it did.
OSU_REASON_UNSPECIFIEDNo system reason.OSU_REASON_ADMIN_CANCELEDCanceled by the system, such as ahead of maintenance or shutdown.OSU_REASON_INSUFFICIENT_BALANCERefused: the account cannot fund the order.OSU_REASON_DUPLICATE_CLIENT_IDRefused: client_order_id is already in use by a live order.OSU_REASON_EXCHANGE_ERRORRefused: the exchange could not accept the order.updated_time_msstringint64When this update happened, in Unix milliseconds.
next_cursorstringPass as cursor to page further back. Absent on the last page.
curl -X GET 'https://api.pax.markets/v1/order/status-updates/fills/recent' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/order/status-updates/fills/recent"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/order/status-updates/fills/recent";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/order/status-updates/fills/recent";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"order_status_updates": [
{
"osu": {
"osu_id": "",
"order_id": "",
"client_order_id": "",
"qty_filled_make": "0",
"qty_filled_take": "0",
"qty_canceled": "0",
"fill_value": "0",
"fee_rebate": "0",
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"origin": 1
},
"order_status": 1,
"reason": 0
},
"updated_time_ms": "0"
}
],
"next_cursor": "string"
}GetFillOrderStatusUpdatesSince
Read the account's fills from a point in time onward, oldest first. A fill is any status update that fills or cancels quantity. Covers the last 10,000 fills per account.
Request
since_time_msstringint64Return updates at or after this time, in Unix milliseconds.
market_idstringuint64OptionalReturn only updates for orders on this market.
limitintegerint32OptionalMaximum updates to return, from 1 to 1000. Defaults to 1000.
cursorstringOptionalCursor from the previous response's next_cursor. Omit to start at since_time_ms.
Response
A successful response.
order_status_updatesobject[]List of status updates on this page.
+ Show 2 properties
osuobjectThe status update, as streamed.
+ Show 11 properties
osu_idstringId of this status update. Empty when the order was rejected before an update id was assigned.
order_idstringOrder this update belongs to. Empty when the order was rejected before an order id was assigned.
client_order_idstringThe order's client_order_id. Empty if none was sent.
qty_filled_makestringint64Quantity filled as maker in this update.
qty_filled_takestringint64Quantity filled as taker in this update.
qty_canceledstringint64Quantity canceled in this update.
fill_valuestringint64Value filled in this update, in the quote asset's native units.
fee_rebatestringint64Rebate paid, or fee charged when negative, in the quote asset's native units.
orderobjectThe order as placed.
+ Show 6 properties
sideenumSide the order was placed on.
ASKSell the base asset.BIDBuy the base asset.market_idstringuint64Market the order was placed on.
qtystringint64Quantity submitted. Negative for a cancel order.
ticksintegerint32Limit price in ticks.
tifenumTime in force the order was placed with.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.originenumWhat placed the order.
EXOGENOUSPlaced directly through the API.LAMBDAPlaced by a lambda program.ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.order_statusenumOrder status after this update.
ORDER_STATUS_PENDINGAccepted, not yet acknowledged by the matching engine.ORDER_STATUS_RESTINGOn the book with quantity left to fill.ORDER_STATUS_FILLEDFully filled.ORDER_STATUS_CANCELEDCanceled with nothing filled.ORDER_STATUS_PARTIALPartly filled, with the rest canceled.ORDER_STATUS_REJECTEDRefused.reasonenumWhy the system refused or canceled the order, if it did.
OSU_REASON_UNSPECIFIEDNo system reason.OSU_REASON_ADMIN_CANCELEDCanceled by the system, such as ahead of maintenance or shutdown.OSU_REASON_INSUFFICIENT_BALANCERefused: the account cannot fund the order.OSU_REASON_DUPLICATE_CLIENT_IDRefused: client_order_id is already in use by a live order.OSU_REASON_EXCHANGE_ERRORRefused: the exchange could not accept the order.updated_time_msstringint64When this update happened, in Unix milliseconds.
next_cursorstringPass as cursor to fetch the next page. Absent on the last page.
curl -X GET 'https://api.pax.markets/v1/order/status-updates/fills/since?since_time_ms=<since_time_ms>' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/order/status-updates/fills/since?since_time_ms=<since_time_ms>"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/order/status-updates/fills/since?since_time_ms=<since_time_ms>";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/order/status-updates/fills/since?since_time_ms=<since_time_ms>";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"order_status_updates": [
{
"osu": {
"osu_id": "",
"order_id": "",
"client_order_id": "",
"qty_filled_make": "0",
"qty_filled_take": "0",
"qty_canceled": "0",
"fill_value": "0",
"fee_rebate": "0",
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"origin": 1
},
"order_status": 1,
"reason": 0
},
"updated_time_ms": "0"
}
],
"next_cursor": "string"
}SubmitLambda
Submit a lambda program. Requires a LAMBDA account.
Request
lambda_programobjectThe lambda program to submit.
+ Show 3 properties
orderobjectThe order to place when the predicate is met. A negative qty with tif IOC cancels that much liquidity instead.
+ Show 6 properties
sideenumSide to place on.
ASKSell the base asset.BIDBuy the base asset.market_idstringuint64Market to place on.
qtystringint64Quantity to place, a multiple of the market's step size. Must be positive except on a cancel lambda.
ticksintegerint32Limit price in ticks, from 1 to the market's max_ticks.
tifenumHow long the order stays live.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.is_leveragebooleanTrade on margin. Currently disabled.
predicateobjectCondition that triggers the lambda program.
+ Show 2 properties
index_dataobjectWhich events to watch.
+ Show 3 properties
pred_sideenumSide of the book to watch.
ASKSell the base asset.BIDBuy the base asset.pred_typeenumKind of book event to watch for.
LIQ_ADDLiquidity arriving on the book.LIQ_RMDLiquidity leaving the book.IM_MISSAn IOC order that found nothing to fill against.market_idstringuint64Market to watch.
match_dataobjectWhich of those events qualify.
+ Show 7 properties
pred_qualenumWhich liquidity-removal events qualify.
ANYAny removal.EXRemoval by execution.CXRemoval by cancel.XAA crossing order that removes opposite-side liquidity and rests the remainder.ticks_typeenumHow the tick bounds are interpreted.
ABS_TICKSMatch the event's absolute tick price.DELTA_GT_BEST_ASKMatch the event's tick depth below the best ask. Local only, requires pred_side ASK.DELTA_LT_BEST_BIDMatch the event's tick depth above the best bid. Local only, requires pred_side BID.MID_PX_CHANGE_ABSMatch the absolute mid-price move from ref_ticks. Remote only.MID_PX_CHANGE_SGNMatch the signed mid-price move from ref_ticks. Remote only.qty_typeenumHow the quantity bounds are interpreted.
LEVEL_QTYMatch the quantity resting at the event's price level.DELTA_QTYMatch the change in quantity the event caused.min_ticksintegerint32Lowest tick that qualifies.
max_ticksintegerint32Highest tick that qualifies.
min_qtystringint64Smallest quantity that qualifies.
max_qtystringint64Largest quantity that qualifies.
lr_paramsobjectHow the triggered order's quantity and price are chosen.
+ Show 3 properties
lr_qty_typeenumHow the triggered order's quantity is chosen.
ENTIREPlace the order's full quantity. The lambda program is exhausted once it triggers.PARTIALPlace the quantity in partial_qty. Not yet available.OPP_TOB_QTYPlace the opposite side's top-of-book quantity. Not yet available.DELTA_QTY_RMDPlace the triggering event's liquidity delta, dribbling the order onto the book across repeated triggers. Local only, requires a LIQ_RMD predicate.PERMANENTStay in force indefinitely rather than exhausting. Not yet available.MM_CX_PREVCancel the order placed last time and rest a fresh one. Remote only, requires tif GTC.partial_qtystringint64Quantity used when lr_qty_type is PARTIAL.
lr_ticks_typeenumHow the triggered order's price is chosen.
TICKS_ABSUse the order's absolute tick price.TICKS_DELTAOffset the event's price by the order's ticks. Not yet available.client_lambda_idstringOptionalClient-supplied id, at most 36 bytes. Rejected if it matches another of the account's live lambda programs.
Response
A successful response.
lambda_idstringExchange-assigned lambda id.
curl -X POST 'https://api.pax.markets/v1/lambda/submit' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"lambda_program": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"predicate": {
"index_data": {
"pred_side": 1,
"pred_type": 1,
"market_id": "0"
},
"match_data": {
"pred_qual": 1,
"ticks_type": 1,
"qty_type": 1,
"min_ticks": 0,
"max_ticks": 0,
"min_qty": "0",
"max_qty": "0"
}
},
"lr_params": {
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1
}
},
"client_lambda_id": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/lambda/submit"
body = json.dumps({
"lambda_program": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": False
},
"predicate": {
"index_data": {
"pred_side": 1,
"pred_type": 1,
"market_id": "0"
},
"match_data": {
"pred_qual": 1,
"ticks_type": 1,
"qty_type": 1,
"min_ticks": 0,
"max_ticks": 0,
"min_qty": "0",
"max_qty": "0"
}
},
"lr_params": {
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1
}
},
"client_lambda_id": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/lambda/submit";
let body = serde_json::to_string(&serde_json::json!({
"lambda_program": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"predicate": {
"index_data": {
"pred_side": 1,
"pred_type": 1,
"market_id": "0"
},
"match_data": {
"pred_qual": 1,
"ticks_type": 1,
"qty_type": 1,
"min_ticks": 0,
"max_ticks": 0,
"min_qty": "0",
"max_qty": "0"
}
},
"lr_params": {
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1
}
},
"client_lambda_id": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/lambda/submit";
const body = JSON.stringify({
"lambda_program": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"predicate": {
"index_data": {
"pred_side": 1,
"pred_type": 1,
"market_id": "0"
},
"match_data": {
"pred_qual": 1,
"ticks_type": 1,
"qty_type": 1,
"min_ticks": 0,
"max_ticks": 0,
"min_qty": "0",
"max_qty": "0"
}
},
"lr_params": {
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1
}
},
"client_lambda_id": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"lambda_id": "string"
}SubmitRemoteLambda
Not yet available.
Request
remote_lambda_programobjectThe lambda program to submit.
+ Show 3 properties
orderobjectThe order to place when the predicate is met.
+ Show 6 properties
sideenumSide to place on.
ASKSell the base asset.BIDBuy the base asset.market_idstringuint64Market to place on.
qtystringint64Quantity to place, a multiple of the market's step size. Must be positive except on a cancel lambda.
ticksintegerint32Limit price in ticks, from 1 to the market's max_ticks.
tifenumHow long the order stays live.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.is_leveragebooleanTrade on margin. Currently disabled.
predicateobjectCondition that triggers the lambda program.
+ Show 2 properties
index_dataobjectWhich remote events to watch.
+ Show 2 properties
event_typeenumKind of remote event to watch for.
MIDPXMid-price tick on the remote venue.TRADETrade execution on the remote venue.market_idstringuint64Market to watch.
match_dataobjectWhich of those events qualify.
+ Show 5 properties
ticks_typeenumHow the tick bounds are interpreted.
ABS_TICKSMatch the event's absolute tick price.DELTA_GT_BEST_ASKMatch the event's tick depth below the best ask. Local only, requires pred_side ASK.DELTA_LT_BEST_BIDMatch the event's tick depth above the best bid. Local only, requires pred_side BID.MID_PX_CHANGE_ABSMatch the absolute mid-price move from ref_ticks. Remote only.MID_PX_CHANGE_SGNMatch the signed mid-price move from ref_ticks. Remote only.venueenumRemote venue whose feed to watch.
ANY_VENUEAny available venue.BNBinance.CBCoinbase.KNKraken.OKXOKX.BYBBybit.min_ticksintegerint32Lowest tick that qualifies.
max_ticksintegerint32Highest tick that qualifies.
ref_ticksintegerint32Reference price in ticks for relative bounds.
lr_paramsobjectHow the triggered order's quantity and price are chosen.
+ Show 3 properties
lr_qty_typeenumHow the triggered order's quantity is chosen.
ENTIREPlace the order's full quantity. The lambda program is exhausted once it triggers.PARTIALPlace the quantity in partial_qty. Not yet available.OPP_TOB_QTYPlace the opposite side's top-of-book quantity. Not yet available.DELTA_QTY_RMDPlace the triggering event's liquidity delta, dribbling the order onto the book across repeated triggers. Local only, requires a LIQ_RMD predicate.PERMANENTStay in force indefinitely rather than exhausting. Not yet available.MM_CX_PREVCancel the order placed last time and rest a fresh one. Remote only, requires tif GTC.partial_qtystringint64Quantity used when lr_qty_type is PARTIAL.
lr_ticks_typeenumHow the triggered order's price is chosen.
TICKS_ABSUse the order's absolute tick price.TICKS_DELTAOffset the event's price by the order's ticks. Not yet available.client_lambda_idstringOptionalClient-supplied id, at most 36 bytes. Rejected if it matches another of the account's live lambda programs.
Response
A successful response.
lambda_idstringExchange-assigned lambda id.
curl -X POST 'https://api.pax.markets/v1/lambda/submit-remote' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"remote_lambda_program": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"predicate": {
"index_data": {
"event_type": 1,
"market_id": "0"
},
"match_data": {
"ticks_type": 1,
"venue": 1,
"min_ticks": 0,
"max_ticks": 0,
"ref_ticks": 0
}
},
"lr_params": {
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1
}
},
"client_lambda_id": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/lambda/submit-remote"
body = json.dumps({
"remote_lambda_program": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": False
},
"predicate": {
"index_data": {
"event_type": 1,
"market_id": "0"
},
"match_data": {
"ticks_type": 1,
"venue": 1,
"min_ticks": 0,
"max_ticks": 0,
"ref_ticks": 0
}
},
"lr_params": {
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1
}
},
"client_lambda_id": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/lambda/submit-remote";
let body = serde_json::to_string(&serde_json::json!({
"remote_lambda_program": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"predicate": {
"index_data": {
"event_type": 1,
"market_id": "0"
},
"match_data": {
"ticks_type": 1,
"venue": 1,
"min_ticks": 0,
"max_ticks": 0,
"ref_ticks": 0
}
},
"lr_params": {
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1
}
},
"client_lambda_id": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/lambda/submit-remote";
const body = JSON.stringify({
"remote_lambda_program": {
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"predicate": {
"index_data": {
"event_type": 1,
"market_id": "0"
},
"match_data": {
"ticks_type": 1,
"venue": 1,
"min_ticks": 0,
"max_ticks": 0,
"ref_ticks": 0
}
},
"lr_params": {
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1
}
},
"client_lambda_id": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"lambda_id": "string"
}CancelLambda
Cancel a lambda program, releasing its untriggered quantity.
Request
lambda_idstringId of the lambda program to cancel.
client_cancel_idstringOptionalClient-supplied id for the cancel, at most 36 bytes.
Response
A successful response.
cancel_lambda_idstringExchange-assigned id of the cancel, not of the lambda program being canceled.
curl -X POST 'https://api.pax.markets/v1/lambda/cancel' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"lambda_id": "",
"client_cancel_id": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/lambda/cancel"
body = json.dumps({
"lambda_id": "",
"client_cancel_id": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/lambda/cancel";
let body = serde_json::to_string(&serde_json::json!({
"lambda_id": "",
"client_cancel_id": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/lambda/cancel";
const body = JSON.stringify({
"lambda_id": "",
"client_cancel_id": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"cancel_lambda_id": "string"
}GetRecentLambdaStatusUpdates
Read the account's most recent lambda status updates, newest first. Covers the last 10,000 updates per account.
Request
limitintegerint32OptionalMaximum updates to return, from 1 to 1000. Defaults to 1000.
cursorstringOptionalCursor from the previous response's next_cursor. Omit to start at the newest update.
Response
A successful response.
lambda_status_updatesobject[]List of status updates on this page.
+ Show 2 properties
lsuobjectThe status update, as streamed.
+ Show 6 properties
lsu_idstringId of this status update.
lambda_idstringLambda program this update belongs to. Empty when the lambda submission was rejected before a lambda id was assigned.
client_lambda_idstringThe lambda program's client_lambda_id. Empty if none was sent.
delta_qtystringint64Change in the lambda program's untriggered quantity. Negative when it triggers or is canceled.
statusenumStatus the lambda program moved to.
LAMBDA_STATUS_PENDINGSubmitted, not yet accepted.LAMBDA_STATUS_IN_FORCEIn force and evaluated on every matching event.LAMBDA_STATUS_OUT_OF_FORCENo longer in force: exhausted, canceled, or reset by a system restart.LAMBDA_STATUS_REJECTEDRefused.reasonenumWhy the lambda program moved to that status.
PROGRAMMEDAccepted and now in force.CANCELEDCanceled by the client or automatically.MODIFIEDThe lambda program's quantity changed.EXHAUSTEDAll quantity has triggered.SYSTEM_RESTARTState reset by a system restart.INSUFFICIENT_BALANCERefused: the account cannot fund the lambda program.DUPLICATE_CLIENT_IDRefused: client_lambda_id is already in use by a live lambda program.INVALID_LAMBDARefused: the lambda program is not valid.EXCHANGE_ERRORRefused: the exchange could not accept the lambda program.created_time_msstringint64When this update happened, in Unix milliseconds.
next_cursorstringPass as cursor to page further back. Absent on the last page.
curl -X GET 'https://api.pax.markets/v1/lambda/status-updates/recent' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/lambda/status-updates/recent"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/lambda/status-updates/recent";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/lambda/status-updates/recent";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"lambda_status_updates": [
{
"lsu": {
"lsu_id": "",
"lambda_id": "",
"client_lambda_id": "",
"delta_qty": "0",
"status": 1,
"reason": 1
},
"created_time_ms": "0"
}
],
"next_cursor": "string"
}GetLambdaStatusUpdatesSince
Read the account's lambda status updates from a point in time onward, oldest first. Covers the last 10,000 updates per account.
Request
since_time_msstringint64Return updates at or after this time, in Unix milliseconds.
limitintegerint32OptionalMaximum updates to return, from 1 to 1000. Defaults to 1000.
cursorstringOptionalCursor from the previous response's next_cursor. Omit to start at since_time_ms.
Response
A successful response.
lambda_status_updatesobject[]List of status updates on this page.
+ Show 2 properties
lsuobjectThe status update, as streamed.
+ Show 6 properties
lsu_idstringId of this status update.
lambda_idstringLambda program this update belongs to. Empty when the lambda submission was rejected before a lambda id was assigned.
client_lambda_idstringThe lambda program's client_lambda_id. Empty if none was sent.
delta_qtystringint64Change in the lambda program's untriggered quantity. Negative when it triggers or is canceled.
statusenumStatus the lambda program moved to.
LAMBDA_STATUS_PENDINGSubmitted, not yet accepted.LAMBDA_STATUS_IN_FORCEIn force and evaluated on every matching event.LAMBDA_STATUS_OUT_OF_FORCENo longer in force: exhausted, canceled, or reset by a system restart.LAMBDA_STATUS_REJECTEDRefused.reasonenumWhy the lambda program moved to that status.
PROGRAMMEDAccepted and now in force.CANCELEDCanceled by the client or automatically.MODIFIEDThe lambda program's quantity changed.EXHAUSTEDAll quantity has triggered.SYSTEM_RESTARTState reset by a system restart.INSUFFICIENT_BALANCERefused: the account cannot fund the lambda program.DUPLICATE_CLIENT_IDRefused: client_lambda_id is already in use by a live lambda program.INVALID_LAMBDARefused: the lambda program is not valid.EXCHANGE_ERRORRefused: the exchange could not accept the lambda program.created_time_msstringint64When this update happened, in Unix milliseconds.
next_cursorstringPass as cursor to fetch the next page. Absent on the last page.
curl -X GET 'https://api.pax.markets/v1/lambda/status-updates/since?since_time_ms=<since_time_ms>' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/lambda/status-updates/since?since_time_ms=<since_time_ms>"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/lambda/status-updates/since?since_time_ms=<since_time_ms>";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/lambda/status-updates/since?since_time_ms=<since_time_ms>";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"lambda_status_updates": [
{
"lsu": {
"lsu_id": "",
"lambda_id": "",
"client_lambda_id": "",
"delta_qty": "0",
"status": 1,
"reason": 1
},
"created_time_ms": "0"
}
],
"next_cursor": "string"
}GetLambdaStatusUpdates
Read the full status update history of one lambda program. Updates can take up to 15 minutes to appear here.
Request
lambda_idstringLambda program whose history to read.
limitintegerint32OptionalMaximum updates to return, from 1 to 1000. Defaults to 1000.
cursorstringOptionalCursor from the previous response's next_cursor. Omit for the first page.
Response
A successful response.
lambda_status_updatesobject[]List of status updates on this page.
+ Show 2 properties
lsuobjectThe status update, as streamed.
+ Show 6 properties
lsu_idstringId of this status update.
lambda_idstringLambda program this update belongs to. Empty when the lambda submission was rejected before a lambda id was assigned.
client_lambda_idstringThe lambda program's client_lambda_id. Empty if none was sent.
delta_qtystringint64Change in the lambda program's untriggered quantity. Negative when it triggers or is canceled.
statusenumStatus the lambda program moved to.
LAMBDA_STATUS_PENDINGSubmitted, not yet accepted.LAMBDA_STATUS_IN_FORCEIn force and evaluated on every matching event.LAMBDA_STATUS_OUT_OF_FORCENo longer in force: exhausted, canceled, or reset by a system restart.LAMBDA_STATUS_REJECTEDRefused.reasonenumWhy the lambda program moved to that status.
PROGRAMMEDAccepted and now in force.CANCELEDCanceled by the client or automatically.MODIFIEDThe lambda program's quantity changed.EXHAUSTEDAll quantity has triggered.SYSTEM_RESTARTState reset by a system restart.INSUFFICIENT_BALANCERefused: the account cannot fund the lambda program.DUPLICATE_CLIENT_IDRefused: client_lambda_id is already in use by a live lambda program.INVALID_LAMBDARefused: the lambda program is not valid.EXCHANGE_ERRORRefused: the exchange could not accept the lambda program.created_time_msstringint64When this update happened, in Unix milliseconds.
next_cursorstringPass as cursor to fetch the next page. Absent on the last page.
curl -X GET 'https://api.pax.markets/v1/lambda/status-updates?lambda_id=<lambda_id>' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/lambda/status-updates?lambda_id=<lambda_id>"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/lambda/status-updates?lambda_id=<lambda_id>";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/lambda/status-updates?lambda_id=<lambda_id>";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"lambda_status_updates": [
{
"lsu": {
"lsu_id": "",
"lambda_id": "",
"client_lambda_id": "",
"delta_qty": "0",
"status": 1,
"reason": 1
},
"created_time_ms": "0"
}
],
"next_cursor": "string"
}GetLambda
Fetch one lambda program by lambda_id.
Path Parameters
lambda_idstringId of the lambda program to fetch.
Response
A successful response.
lambda_idstringExchange-assigned lambda id.
market_idstringuint64Market the lambda program places its order on.
sideenumSide of the order the lambda program places.
ASKSell the base asset.BIDBuy the base asset.qtystringint64Quantity the lambda program was submitted with. Negative for a cancel lambda.
ticksintegerint32Limit price of the order the lambda program places, in ticks.
tifenumTime in force of the order the lambda program places.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.is_leveragebooleanTrade on margin. Currently disabled.
predicate_index_datastringThe predicate's index_data, as a JSON string.
predicate_match_datastringThe predicate's match_data, as a JSON string.
lr_qty_typeenumHow the triggered order's quantity is chosen.
ENTIREPlace the order's full quantity. The lambda program is exhausted once it triggers.PARTIALPlace the quantity in partial_qty. Not yet available.OPP_TOB_QTYPlace the opposite side's top-of-book quantity. Not yet available.DELTA_QTY_RMDPlace the triggering event's liquidity delta, dribbling the order onto the book across repeated triggers. Local only, requires a LIQ_RMD predicate.PERMANENTStay in force indefinitely rather than exhausting. Not yet available.MM_CX_PREVCancel the order placed last time and rest a fresh one. Remote only, requires tif GTC.partial_qtystringint64Quantity used when lr_qty_type is PARTIAL.
lr_ticks_typeenumHow the triggered order's price is chosen.
TICKS_ABSUse the order's absolute tick price.TICKS_DELTAOffset the event's price by the order's ticks. Not yet available.lambda_statusenumCurrent status of the lambda program.
LAMBDA_STATUS_PENDINGSubmitted, not yet accepted.LAMBDA_STATUS_IN_FORCEIn force and evaluated on every matching event.LAMBDA_STATUS_OUT_OF_FORCENo longer in force: exhausted, canceled, or reset by a system restart.LAMBDA_STATUS_REJECTEDRefused.qty_triggeredstringint64Quantity the lambda program has triggered so far.
is_remotebooleanWhether the predicate watches a remote venue.
created_time_msstringint64When the lambda program was submitted, in Unix milliseconds.
updated_time_msstringint64When the lambda program last changed, in Unix milliseconds.
client_lambda_idstringClient-supplied id from the submit request.
curl -X GET 'https://api.pax.markets/v1/lambda/{lambda_id}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/lambda/{lambda_id}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/lambda/{lambda_id}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/lambda/{lambda_id}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"lambda_id": "string",
"market_id": "0",
"side": 1,
"qty": "0",
"ticks": 42,
"tif": 1,
"is_leverage": true,
"predicate_index_data": "string",
"predicate_match_data": "string",
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1,
"lambda_status": 1,
"qty_triggered": "0",
"is_remote": true,
"created_time_ms": "0",
"updated_time_ms": "0",
"client_lambda_id": "string"
}GetLambdas
List the account's lambda programs, newest first, optionally narrowed to one market and one status.
Request
lambda_statusenumOptionalReturn only lambda programs in this status.
LAMBDA_STATUS_PENDINGSubmitted, not yet accepted.LAMBDA_STATUS_IN_FORCEIn force and evaluated on every matching event.LAMBDA_STATUS_OUT_OF_FORCENo longer in force: exhausted, canceled, or reset by a system restart.LAMBDA_STATUS_REJECTEDRefused.market_idstringuint64OptionalReturn only lambda programs on this market. Omit for every market.
limitintegerint32OptionalMaximum lambda programs to return, from 1 to 1000. Defaults to 1000.
cursorstringOptionalCursor from the previous response's next_cursor. Omit for the first page.
Response
A successful response.
lambdasobject[]List of lambda programs on this page.
+ Show 18 properties
lambda_idstringExchange-assigned lambda id.
market_idstringuint64Market the lambda program places its order on.
sideenumSide of the order the lambda program places.
ASKSell the base asset.BIDBuy the base asset.qtystringint64Quantity the lambda program was submitted with. Negative for a cancel lambda.
ticksintegerint32Limit price of the order the lambda program places, in ticks.
tifenumTime in force of the order the lambda program places.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.is_leveragebooleanTrade on margin. Currently disabled.
predicate_index_datastringThe predicate's index_data, as a JSON string.
predicate_match_datastringThe predicate's match_data, as a JSON string.
lr_qty_typeenumHow the triggered order's quantity is chosen.
ENTIREPlace the order's full quantity. The lambda program is exhausted once it triggers.PARTIALPlace the quantity in partial_qty. Not yet available.OPP_TOB_QTYPlace the opposite side's top-of-book quantity. Not yet available.DELTA_QTY_RMDPlace the triggering event's liquidity delta, dribbling the order onto the book across repeated triggers. Local only, requires a LIQ_RMD predicate.PERMANENTStay in force indefinitely rather than exhausting. Not yet available.MM_CX_PREVCancel the order placed last time and rest a fresh one. Remote only, requires tif GTC.partial_qtystringint64Quantity used when lr_qty_type is PARTIAL.
lr_ticks_typeenumHow the triggered order's price is chosen.
TICKS_ABSUse the order's absolute tick price.TICKS_DELTAOffset the event's price by the order's ticks. Not yet available.lambda_statusenumCurrent status of the lambda program.
LAMBDA_STATUS_PENDINGSubmitted, not yet accepted.LAMBDA_STATUS_IN_FORCEIn force and evaluated on every matching event.LAMBDA_STATUS_OUT_OF_FORCENo longer in force: exhausted, canceled, or reset by a system restart.LAMBDA_STATUS_REJECTEDRefused.qty_triggeredstringint64Quantity the lambda program has triggered so far.
is_remotebooleanWhether the predicate watches a remote venue.
created_time_msstringint64When the lambda program was submitted, in Unix milliseconds.
updated_time_msstringint64When the lambda program last changed, in Unix milliseconds.
client_lambda_idstringClient-supplied id from the submit request.
next_cursorstringPass as cursor to fetch the next page. Absent on the last page.
curl -X GET 'https://api.pax.markets/v1/lambda/list' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/lambda/list"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/lambda/list";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/lambda/list";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"lambdas": [
{
"lambda_id": "",
"market_id": "0",
"side": 1,
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false,
"predicate_index_data": "",
"predicate_match_data": "",
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1,
"lambda_status": 1,
"qty_triggered": "0",
"is_remote": false,
"created_time_ms": "0",
"updated_time_ms": "0",
"client_lambda_id": ""
}
],
"next_cursor": "string"
}GetActiveLambdas
List the account's lambda programs currently in force.
Request
market_idstringuint64OptionalReturn only lambda programs on this market. Omit for every market.
Response
A successful response.
lambdasobject[]List of the account's lambda programs in force.
+ Show 11 properties
lambda_idstringExchange-assigned lambda id.
client_lambda_idstringThe lambda program's client_lambda_id. Empty if none was sent.
orderobjectThe order the lambda program places when it triggers.
+ Show 6 properties
sideenumSide the order was placed on.
ASKSell the base asset.BIDBuy the base asset.market_idstringuint64Market the order was placed on.
qtystringint64Quantity submitted. Negative for a cancel order.
ticksintegerint32Limit price in ticks.
tifenumTime in force the order was placed with.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.originenumWhat placed the order.
EXOGENOUSPlaced directly through the API.LAMBDAPlaced by a lambda program.ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.statusenumCurrent status of the lambda program.
LAMBDA_STATUS_PENDINGSubmitted, not yet accepted.LAMBDA_STATUS_IN_FORCEIn force and evaluated on every matching event.LAMBDA_STATUS_OUT_OF_FORCENo longer in force: exhausted, canceled, or reset by a system restart.LAMBDA_STATUS_REJECTEDRefused.is_remotebooleanWhether the predicate watches a remote venue.
is_leveragebooleanTrade on margin. Currently disabled.
predicate_index_datastringThe predicate's index_data, as a JSON string.
predicate_match_datastringThe predicate's match_data, as a JSON string.
lr_qty_typeenumHow the triggered order's quantity is chosen.
ENTIREPlace the order's full quantity. The lambda program is exhausted once it triggers.PARTIALPlace the quantity in partial_qty. Not yet available.OPP_TOB_QTYPlace the opposite side's top-of-book quantity. Not yet available.DELTA_QTY_RMDPlace the triggering event's liquidity delta, dribbling the order onto the book across repeated triggers. Local only, requires a LIQ_RMD predicate.PERMANENTStay in force indefinitely rather than exhausting. Not yet available.MM_CX_PREVCancel the order placed last time and rest a fresh one. Remote only, requires tif GTC.partial_qtystringint64Quantity used when lr_qty_type is PARTIAL.
lr_ticks_typeenumHow the triggered order's price is chosen.
TICKS_ABSUse the order's absolute tick price.TICKS_DELTAOffset the event's price by the order's ticks. Not yet available.curl -X GET 'https://api.pax.markets/v1/lambda/active' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/lambda/active"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/lambda/active";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/lambda/active";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"lambdas": [
{
"lambda_id": "",
"client_lambda_id": "",
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"origin": 1
},
"status": 1,
"is_remote": false,
"is_leverage": false,
"predicate_index_data": "",
"predicate_match_data": "",
"lr_qty_type": 1,
"partial_qty": "0",
"lr_ticks_type": 1
}
]
}GetPendingLambdaCancels
List the account's lambda cancels that are not yet confirmed.
Response
A successful response.
pending_cancelsobject[]List of cancels in flight.
+ Show 2 properties
lambda_idstringLambda program being canceled.
client_cancel_idstringThe cancel's client_cancel_id. Empty if none was sent.
curl -X GET 'https://api.pax.markets/v1/lambda/pending-cancels' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/lambda/pending-cancels"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/lambda/pending-cancels";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/lambda/pending-cancels";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"pending_cancels": [
{
"lambda_id": "",
"client_cancel_id": ""
}
]
}CreateApiKey
Create an API key. Only works from a signed-in session in the PAX app; requests signed with an API key get 403.
Request
descriptionstringOptionalexpires_at_unix_secondsstringint64Optionalpublic_keystringcan_tradebooleancan_withdrawbooleanaccount_typeenumip_whiteliststring[]OptionalResponse
A successful response.
key_idstringcurl -X POST 'https://api.pax.markets/v1/account/create-api-key' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"description": "",
"expires_at_unix_seconds": "0",
"public_key": "",
"can_trade": false,
"can_withdraw": false,
"account_type": 0,
"ip_whitelist": []
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/account/create-api-key"
body = json.dumps({
"description": "",
"expires_at_unix_seconds": "0",
"public_key": "",
"can_trade": False,
"can_withdraw": False,
"account_type": 0,
"ip_whitelist": []
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/account/create-api-key";
let body = serde_json::to_string(&serde_json::json!({
"description": "",
"expires_at_unix_seconds": "0",
"public_key": "",
"can_trade": false,
"can_withdraw": false,
"account_type": 0,
"ip_whitelist": []
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/account/create-api-key";
const body = JSON.stringify({
"description": "",
"expires_at_unix_seconds": "0",
"public_key": "",
"can_trade": false,
"can_withdraw": false,
"account_type": 0,
"ip_whitelist": []
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"key_id": "string"
}RevokeApiKey
Request
key_idstringResponse
A successful response.
successbooleancurl -X POST 'https://api.pax.markets/v1/account/revoke-api-key' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"key_id": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/account/revoke-api-key"
body = json.dumps({
"key_id": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/account/revoke-api-key";
let body = serde_json::to_string(&serde_json::json!({
"key_id": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/account/revoke-api-key";
const body = JSON.stringify({
"key_id": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"success": true
}GetBalance
Request
assetenumOptionalResponse
A successful response.
asset_balancesobject[]+ Show 3 properties
assetenumbalance_qtystringint64frozen_qtystringint64curl -X GET 'https://api.pax.markets/v1/account/get-balance' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/account/get-balance"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/account/get-balance";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/account/get-balance";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"asset_balances": [
{
"asset": 1,
"balance_qty": "0",
"frozen_qty": "0"
}
]
}GetBalancesForMarket
Path Parameters
market_idstringuint64Response
A successful response.
asset_balancesobject[]+ Show 3 properties
assetenumbalance_qtystringint64frozen_qtystringint64curl -X GET 'https://api.pax.markets/v1/account/get-balances-for-market/{market_id}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/account/get-balances-for-market/{market_id}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/account/get-balances-for-market/{market_id}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/account/get-balances-for-market/{market_id}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"asset_balances": [
{
"asset": 1,
"balance_qty": "0",
"frozen_qty": "0"
}
]
}GetAccountStatus
Response
A successful response.
emailstringkyc_statusenumkyc_completed_at_unix_secondsstringint64curl -X GET 'https://api.pax.markets/v1/account/status' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/account/status"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/account/status";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/account/status";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"email": "string",
"kyc_status": 0,
"kyc_completed_at_unix_seconds": "0"
}ListApiKeys
Response
A successful response.
keysobject[]+ Show 11 properties
key_idstringdescriptionstringcreated_at_unix_secondsstringint64expires_at_unix_secondsstringint64revokedbooleanpublic_keystringcan_tradebooleancan_withdrawbooleanaccount_typeenumip_whiteliststring[]created_by_emailstringEmail of the team member who created the key, when known. Only returned to signed-in sessions.
curl -X GET 'https://api.pax.markets/v1/account/api-keys' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/account/api-keys"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/account/api-keys";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/account/api-keys";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"keys": [
{
"key_id": "",
"description": "",
"created_at_unix_seconds": "0",
"expires_at_unix_seconds": "0",
"revoked": false,
"public_key": "",
"can_trade": false,
"can_withdraw": false,
"account_type": 0,
"ip_whitelist": [],
"created_by_email": ""
}
]
}ListAccounts
Response
A successful response.
accountsobject[]+ Show 2 properties
external_account_idstringaccount_typeenumcurl -X GET 'https://api.pax.markets/v1/account/list-accounts' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/account/list-accounts"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/account/list-accounts";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/account/list-accounts";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"accounts": [
{
"external_account_id": "",
"account_type": 0
}
]
}GetExchangeInfo
List the exchange's markets, assets and fee rates.
Response
A successful response.
assetsobject[]List of all traded assets.
+ Show 4 properties
asset_idstringuint64Asset id.
asset_namestringAsset name.
native_unit_namestringName of the asset's smallest unit.
num_native_unitsstringint64Native units in one whole asset.
marketsobject[]List of all traded markets.
+ Show 13 properties
market_idstringuint64Market id.
market_namestringMarket name.
market_typeenumKind of market.
SPOTBuy or sell the base asset outright.base_asset_idstringuint64Asset bought or sold.
quote_asset_idstringuint64Asset paid or received.
qty_unit_namestringName of the base asset's native unit.
tick_unit_namestringName of the quote asset's native unit.
tick_sizestringuint64Quote native units per tick.
qty_step_sizestringint64Base native units per step.
max_qtystringint64Largest order quantity, in base native units.
notesstringAdditional notes.
max_ticksintegerint32Highest order price, in ticks.
min_notionalstringint64Smallest order value at its limit price, in quote native units.
feesobjectFee and rebate rates, settled per fill in the quote asset.
+ Show 5 properties
lambda_taker_fee_bpsstringLambda taker fee, in bps of fill value. Rounded up.
lambda_maker_spread_multiplierstringLambda maker fee, as a share of its spread. Rounded up.
lambda_maker_fee_cap_bpsstringLambda maker fee cap, in bps of fill value. Rounded up.
free_tier_rebate_multiplierstringFree-tier rebate, as a share of the lambda counterparty's fee. Rounded down.
free_tier_rebate_cap_bpsstringFree-tier rebate cap, in bps of fill value. Rounded down.
curl -X GET 'https://api.pax.markets/v1/metadata/exchange-info' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/metadata/exchange-info"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/metadata/exchange-info";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/metadata/exchange-info";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"assets": [
{
"asset_id": "0",
"asset_name": "",
"native_unit_name": "",
"num_native_units": "0"
}
],
"markets": [
{
"market_id": "0",
"market_name": "",
"market_type": 1,
"base_asset_id": "0",
"quote_asset_id": "0",
"qty_unit_name": "",
"tick_unit_name": "",
"tick_size": "0",
"qty_step_size": "0",
"max_qty": "0",
"notes": "",
"max_ticks": 0,
"min_notional": "0"
}
],
"fees": {
"lambda_taker_fee_bps": "",
"lambda_maker_spread_multiplier": "",
"lambda_maker_fee_cap_bps": "",
"free_tier_rebate_multiplier": "",
"free_tier_rebate_cap_bps": ""
}
}AttributeCryptoDeposit
Request
crypto_deposit_idstringoriginator_countrystringoriginator_namestringorigin_wallet_typeenumResponse
A successful response.
curl -X POST 'https://api.pax.markets/v1/money/crypto-deposits/attributes' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"crypto_deposit_id": "",
"originator_country": "",
"originator_name": "",
"origin_wallet_type": 1
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/money/crypto-deposits/attributes"
body = json.dumps({
"crypto_deposit_id": "",
"originator_country": "",
"originator_name": "",
"origin_wallet_type": 1
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/money/crypto-deposits/attributes";
let body = serde_json::to_string(&serde_json::json!({
"crypto_deposit_id": "",
"originator_country": "",
"originator_name": "",
"origin_wallet_type": 1
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/money/crypto-deposits/attributes";
const body = JSON.stringify({
"crypto_deposit_id": "",
"originator_country": "",
"originator_name": "",
"origin_wallet_type": 1
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());RegisterWithdrawWallet
Request
chainstringwallet_addressstringwallet_host_typeenumwallet_host_type_info.InstitutionHostedInfoobjectOne of+ Show 2 properties
countrystringnamestringwallet_host_type_info.SelfHostedInfoobjectOne of+ Show 2 properties
descriptionstringwallet_ownerenumrecipient_typeenumrecipient_type_info.EntityRecipientInfoobjectOne of+ Show 6 properties
full_namestringstreet_addressstringcitystringstatestringcountrystringzip_codestringrecipient_type_info.PersonRecipientInfoobjectOne of+ Show 7 properties
first_namestringlast_namestringstreet_addressstringcitystringstatestringcountrystringzip_codestringResponse
A successful response.
statusenumcurl -X POST 'https://api.pax.markets/v1/money/withdraw-wallets' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"chain": "",
"wallet_address": "",
"wallet_host_type": 1,
"wallet_host_type_info": {
"InstitutionHostedInfo": {
"country": "",
"name": ""
}
},
"recipient_type": 1,
"recipient_type_info": {
"EntityRecipientInfo": {
"full_name": "",
"street_address": "",
"city": "",
"state": "",
"country": "",
"zip_code": ""
}
}
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/money/withdraw-wallets"
body = json.dumps({
"chain": "",
"wallet_address": "",
"wallet_host_type": 1,
"wallet_host_type_info": {
"InstitutionHostedInfo": {
"country": "",
"name": ""
}
},
"recipient_type": 1,
"recipient_type_info": {
"EntityRecipientInfo": {
"full_name": "",
"street_address": "",
"city": "",
"state": "",
"country": "",
"zip_code": ""
}
}
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/money/withdraw-wallets";
let body = serde_json::to_string(&serde_json::json!({
"chain": "",
"wallet_address": "",
"wallet_host_type": 1,
"wallet_host_type_info": {
"InstitutionHostedInfo": {
"country": "",
"name": ""
}
},
"recipient_type": 1,
"recipient_type_info": {
"EntityRecipientInfo": {
"full_name": "",
"street_address": "",
"city": "",
"state": "",
"country": "",
"zip_code": ""
}
}
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/money/withdraw-wallets";
const body = JSON.stringify({
"chain": "",
"wallet_address": "",
"wallet_host_type": 1,
"wallet_host_type_info": {
"InstitutionHostedInfo": {
"country": "",
"name": ""
}
},
"recipient_type": 1,
"recipient_type_info": {
"EntityRecipientInfo": {
"full_name": "",
"street_address": "",
"city": "",
"state": "",
"country": "",
"zip_code": ""
}
}
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"status": 0
}SubmitCryptoWithdrawal
Request
chainstringassetenumamountstringint64withdraw_wallet_addressstringidempotency_keystringResponse
A successful response.
statusenumcurl -X POST 'https://api.pax.markets/v1/money/crypto-withdrawals' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"chain": "",
"asset": 1,
"amount": "0",
"withdraw_wallet_address": "",
"idempotency_key": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/money/crypto-withdrawals"
body = json.dumps({
"chain": "",
"asset": 1,
"amount": "0",
"withdraw_wallet_address": "",
"idempotency_key": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/money/crypto-withdrawals";
let body = serde_json::to_string(&serde_json::json!({
"chain": "",
"asset": 1,
"amount": "0",
"withdraw_wallet_address": "",
"idempotency_key": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/money/crypto-withdrawals";
const body = JSON.stringify({
"chain": "",
"asset": 1,
"amount": "0",
"withdraw_wallet_address": "",
"idempotency_key": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"status": 1
}RegisterWithdrawUsBankAccount
Request
idempotency_keystringnicknamestringtransfer_typeenumaccount_holder_namestringaccount_numberstringrouting_numberstringbank_namestringResponse
A successful response.
statusenumcurl -X POST 'https://api.pax.markets/v1/money/withdraw-bank-accounts/us' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"idempotency_key": "",
"nickname": "",
"transfer_type": 1,
"account_holder_name": "",
"account_number": "",
"routing_number": "",
"bank_name": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/money/withdraw-bank-accounts/us"
body = json.dumps({
"idempotency_key": "",
"nickname": "",
"transfer_type": 1,
"account_holder_name": "",
"account_number": "",
"routing_number": "",
"bank_name": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/money/withdraw-bank-accounts/us";
let body = serde_json::to_string(&serde_json::json!({
"idempotency_key": "",
"nickname": "",
"transfer_type": 1,
"account_holder_name": "",
"account_number": "",
"routing_number": "",
"bank_name": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/money/withdraw-bank-accounts/us";
const body = JSON.stringify({
"idempotency_key": "",
"nickname": "",
"transfer_type": 1,
"account_holder_name": "",
"account_number": "",
"routing_number": "",
"bank_name": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"status": 0
}SubmitFiatWithdrawal
Request
idempotency_keystringcurrencystringamountstringint64withdraw_bank_account_idstringmemostringResponse
A successful response.
statusenumcurl -X POST 'https://api.pax.markets/v1/money/fiat-withdrawals' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"idempotency_key": "",
"currency": "",
"amount": "0",
"withdraw_bank_account_id": "",
"memo": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/money/fiat-withdrawals"
body = json.dumps({
"idempotency_key": "",
"currency": "",
"amount": "0",
"withdraw_bank_account_id": "",
"memo": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/money/fiat-withdrawals";
let body = serde_json::to_string(&serde_json::json!({
"idempotency_key": "",
"currency": "",
"amount": "0",
"withdraw_bank_account_id": "",
"memo": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/money/fiat-withdrawals";
const body = JSON.stringify({
"idempotency_key": "",
"currency": "",
"amount": "0",
"withdraw_bank_account_id": "",
"memo": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"status": 0
}CreateConversionQuote
Request
from_assetenumto_assetenumfrom_amountstringint64Response
A successful response.
from_assetenumfrom_amountstringint64to_assetenumto_amountstringint64valid_until_time_msstringint64quote_idstringcurl -X POST 'https://api.pax.markets/v1/money/conversion-quotes' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"from_asset": 1,
"to_asset": 1,
"from_amount": "0"
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/money/conversion-quotes"
body = json.dumps({
"from_asset": 1,
"to_asset": 1,
"from_amount": "0"
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/money/conversion-quotes";
let body = serde_json::to_string(&serde_json::json!({
"from_asset": 1,
"to_asset": 1,
"from_amount": "0"
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/money/conversion-quotes";
const body = JSON.stringify({
"from_asset": 1,
"to_asset": 1,
"from_amount": "0"
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"from_asset": 1,
"from_amount": "0",
"to_asset": 1,
"to_amount": "0",
"valid_until_time_ms": "0",
"quote_id": "string"
}SubmitConversion
Request
idempotency_keystringfrom_assetenumto_assetenumfrom_amountstringint64min_to_amountstringint64quote_idstringResponse
A successful response.
statusenumidstringcurl -X POST 'https://api.pax.markets/v1/money/conversions' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"idempotency_key": "",
"from_asset": 1,
"to_asset": 1,
"from_amount": "0",
"min_to_amount": "0",
"quote_id": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/money/conversions"
body = json.dumps({
"idempotency_key": "",
"from_asset": 1,
"to_asset": 1,
"from_amount": "0",
"min_to_amount": "0",
"quote_id": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/money/conversions";
let body = serde_json::to_string(&serde_json::json!({
"idempotency_key": "",
"from_asset": 1,
"to_asset": 1,
"from_amount": "0",
"min_to_amount": "0",
"quote_id": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/money/conversions";
const body = JSON.stringify({
"idempotency_key": "",
"from_asset": 1,
"to_asset": 1,
"from_amount": "0",
"min_to_amount": "0",
"quote_id": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"status": 1,
"id": "string"
}GetSupportedChainsForAsset
Path Parameters
assetenumResponse
A successful response.
chainsstring[]curl -X GET 'https://api.pax.markets/v1/money/assets/{asset}/chains' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/assets/{asset}/chains"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/assets/{asset}/chains";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/assets/{asset}/chains";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"chains": []
}GetDepositAddresses
Response
A successful response.
deposit_addressesobject[]+ Show 4 properties
chainstringassetenumaddressstringcreated_time_msstringint64curl -X GET 'https://api.pax.markets/v1/money/deposit-addresses' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/deposit-addresses"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/deposit-addresses";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/deposit-addresses";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"deposit_addresses": [
{
"chain": "",
"asset": 1,
"address": "",
"created_time_ms": "0"
}
]
}GetDepositAddress
Path Parameters
assetenumRequest
chainstringResponse
A successful response.
deposit_addressobject+ Show 4 properties
chainstringassetenumaddressstringcreated_time_msstringint64curl -X GET 'https://api.pax.markets/v1/money/deposit-addresses/{asset}?chain=<chain>' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/deposit-addresses/{asset}?chain=<chain>"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/deposit-addresses/{asset}?chain=<chain>";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/deposit-addresses/{asset}?chain=<chain>";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"deposit_address": {
"chain": "",
"asset": 1,
"address": "",
"created_time_ms": "0"
}
}GetCryptoDeposits
Response
A successful response.
depositsobject[]+ Show 9 properties
idstringstatusenumchainstringassetenumamountstringint64source_wallet_addressstringdeposit_wallet_addressstringtransaction_hashstringcreated_time_msstringint64curl -X GET 'https://api.pax.markets/v1/money/crypto-deposits' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/crypto-deposits"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/crypto-deposits";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/crypto-deposits";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"deposits": [
{
"id": "",
"status": 1,
"chain": "",
"asset": 1,
"amount": "0",
"source_wallet_address": "",
"deposit_wallet_address": "",
"transaction_hash": "",
"created_time_ms": "0"
}
]
}GetFiatDepositInstructions
Response
A successful response.
instructionsobject[]+ Show 12 properties
idstringbank_networkenumcurrencystringaccount_holder_namestringaccount_numberstringbank_namestringbank_routing_numberstringbank_swift_codestringreference_codestringconvert_to_assetenumdeposit_feestringint64instruction_typeenumcurl -X GET 'https://api.pax.markets/v1/money/fiat-deposit-instructions' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/fiat-deposit-instructions"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/fiat-deposit-instructions";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/fiat-deposit-instructions";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"instructions": [
{
"id": "",
"bank_network": 1,
"currency": "",
"account_holder_name": "",
"account_number": "",
"bank_name": "",
"bank_routing_number": "",
"bank_swift_code": "",
"reference_code": "",
"convert_to_asset": 1,
"deposit_fee": "0",
"instruction_type": 1
}
]
}GetFiatDeposits
Response
A successful response.
depositsobject[]+ Show 9 properties
idstringstatusenumcurrencystringamountstringint64feestringint64credited_assetenumcredited_amountstringint64created_time_msstringint64bank_networkenumcurl -X GET 'https://api.pax.markets/v1/money/fiat-deposits' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/fiat-deposits"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/fiat-deposits";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/fiat-deposits";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"deposits": [
{
"id": "",
"status": 1,
"currency": "",
"amount": "0",
"fee": "0",
"credited_asset": 1,
"credited_amount": "0",
"created_time_ms": "0",
"bank_network": 1
}
]
}GetWithdrawWallets
Request
include_archivedbooleanOptionalResponse
A successful response.
walletsobject[]+ Show 7 properties
idstringchainstringaddressstringcreated_time_msstringint64archived_time_msstringint64statusenumdescriptionstringcurl -X GET 'https://api.pax.markets/v1/money/withdraw-wallets' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/withdraw-wallets"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/withdraw-wallets";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/withdraw-wallets";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"wallets": [
{
"id": "",
"chain": "",
"address": "",
"created_time_ms": "0",
"archived_time_ms": "0",
"status": 0,
"description": ""
}
]
}GetWithdrawWallet
Path Parameters
withdraw_wallet_idstringResponse
A successful response.
walletobject+ Show 7 properties
idstringchainstringaddressstringcreated_time_msstringint64archived_time_msstringint64statusenumdescriptionstringcurl -X GET 'https://api.pax.markets/v1/money/withdraw-wallets/{withdraw_wallet_id}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/withdraw-wallets/{withdraw_wallet_id}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/withdraw-wallets/{withdraw_wallet_id}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/withdraw-wallets/{withdraw_wallet_id}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"wallet": {
"id": "",
"chain": "",
"address": "",
"created_time_ms": "0",
"archived_time_ms": "0",
"status": 0,
"description": ""
}
}GetWithdrawWalletByAddress
Path Parameters
wallet_addressstringRequest
chainstringResponse
A successful response.
walletobject+ Show 7 properties
idstringchainstringaddressstringcreated_time_msstringint64archived_time_msstringint64statusenumdescriptionstringcurl -X GET 'https://api.pax.markets/v1/money/withdraw-wallets-by-address/{wallet_address}?chain=<chain>' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/withdraw-wallets-by-address/{wallet_address}?chain=<chain>"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/withdraw-wallets-by-address/{wallet_address}?chain=<chain>";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/withdraw-wallets-by-address/{wallet_address}?chain=<chain>";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"wallet": {
"id": "",
"chain": "",
"address": "",
"created_time_ms": "0",
"archived_time_ms": "0",
"status": 0,
"description": ""
}
}GetCryptoWithdrawals
Response
A successful response.
withdrawalsobject[]+ Show 13 properties
idstringidempotency_keystringwithdraw_wallet_addressstringchainstringassetenumamountstringint64fee_tokenstringfeestringint64statusenumtransaction_hashstringcreated_time_msstringint64updated_time_msstringint64received_amountstringint64curl -X GET 'https://api.pax.markets/v1/money/crypto-withdrawals' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/crypto-withdrawals"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/crypto-withdrawals";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/crypto-withdrawals";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"withdrawals": [
{
"id": "",
"idempotency_key": "",
"withdraw_wallet_address": "",
"chain": "",
"asset": 1,
"amount": "0",
"fee_token": "",
"fee": "0",
"status": 1,
"transaction_hash": "",
"created_time_ms": "0",
"updated_time_ms": "0",
"received_amount": "0"
}
]
}GetCryptoWithdrawal
Path Parameters
withdrawal_idstringResponse
A successful response.
withdrawalobject+ Show 13 properties
idstringidempotency_keystringwithdraw_wallet_addressstringchainstringassetenumamountstringint64fee_tokenstringfeestringint64statusenumtransaction_hashstringcreated_time_msstringint64updated_time_msstringint64received_amountstringint64curl -X GET 'https://api.pax.markets/v1/money/crypto-withdrawals/{withdrawal_id}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/crypto-withdrawals/{withdrawal_id}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/crypto-withdrawals/{withdrawal_id}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/crypto-withdrawals/{withdrawal_id}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"withdrawal": {
"id": "",
"idempotency_key": "",
"withdraw_wallet_address": "",
"chain": "",
"asset": 1,
"amount": "0",
"fee_token": "",
"fee": "0",
"status": 1,
"transaction_hash": "",
"created_time_ms": "0",
"updated_time_ms": "0",
"received_amount": "0"
}
}GetCryptoWithdrawalByIdempotencyKey
Path Parameters
idempotency_keystringResponse
A successful response.
withdrawalobject+ Show 13 properties
idstringidempotency_keystringwithdraw_wallet_addressstringchainstringassetenumamountstringint64fee_tokenstringfeestringint64statusenumtransaction_hashstringcreated_time_msstringint64updated_time_msstringint64received_amountstringint64curl -X GET 'https://api.pax.markets/v1/money/crypto-withdrawals-by-idempotency-key/{idempotency_key}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/crypto-withdrawals-by-idempotency-key/{idempotency_key}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/crypto-withdrawals-by-idempotency-key/{idempotency_key}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/crypto-withdrawals-by-idempotency-key/{idempotency_key}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"withdrawal": {
"id": "",
"idempotency_key": "",
"withdraw_wallet_address": "",
"chain": "",
"asset": 1,
"amount": "0",
"fee_token": "",
"fee": "0",
"status": 1,
"transaction_hash": "",
"created_time_ms": "0",
"updated_time_ms": "0",
"received_amount": "0"
}
}GetWithdrawBankAccounts
Request
include_archivedbooleanOptionalResponse
A successful response.
bank_accountsobject[]+ Show 5 properties
bank_account_typeenumus_bank_accountobject+ Show 7 properties
idstringnicknamestringtransfer_typeenumaccount_holder_namestringaccount_numberstringbank_namestringbank_routing_numberstringstatusenumcreated_time_msstringint64archived_time_msstringint64curl -X GET 'https://api.pax.markets/v1/money/withdraw-bank-accounts' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/withdraw-bank-accounts"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/withdraw-bank-accounts";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/withdraw-bank-accounts";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"bank_accounts": [
{
"bank_account_type": 1,
"us_bank_account": {
"id": "",
"nickname": "",
"transfer_type": 1,
"account_holder_name": "",
"account_number": "",
"bank_name": "",
"bank_routing_number": ""
},
"status": 1,
"created_time_ms": "0",
"archived_time_ms": "0"
}
]
}GetWithdrawBankAccount
Path Parameters
withdraw_bank_account_idstringResponse
A successful response.
bank_accountobject+ Show 5 properties
bank_account_typeenumus_bank_accountobject+ Show 7 properties
idstringnicknamestringtransfer_typeenumaccount_holder_namestringaccount_numberstringbank_namestringbank_routing_numberstringstatusenumcreated_time_msstringint64archived_time_msstringint64curl -X GET 'https://api.pax.markets/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"bank_account": {
"bank_account_type": 1,
"us_bank_account": {
"id": "",
"nickname": "",
"transfer_type": 1,
"account_holder_name": "",
"account_number": "",
"bank_name": "",
"bank_routing_number": ""
},
"status": 1,
"created_time_ms": "0",
"archived_time_ms": "0"
}
}GetFiatWithdrawals
Response
A successful response.
withdrawalsobject[]+ Show 13 properties
idstringidempotency_keystringbank_account_idstringtransfer_methodenumcurrencystringamountstringint64fee_currencystringfeestringint64memostringstatusenumreferencestringcreated_time_msstringint64updated_time_msstringint64curl -X GET 'https://api.pax.markets/v1/money/fiat-withdrawals' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/fiat-withdrawals"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/fiat-withdrawals";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/fiat-withdrawals";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"withdrawals": [
{
"id": "",
"idempotency_key": "",
"bank_account_id": "",
"transfer_method": 1,
"currency": "",
"amount": "0",
"fee_currency": "",
"fee": "0",
"memo": "",
"status": 0,
"reference": "",
"created_time_ms": "0",
"updated_time_ms": "0"
}
]
}GetFiatWithdrawal
Path Parameters
withdrawal_idstringResponse
A successful response.
withdrawalobject+ Show 13 properties
idstringidempotency_keystringbank_account_idstringtransfer_methodenumcurrencystringamountstringint64fee_currencystringfeestringint64memostringstatusenumreferencestringcreated_time_msstringint64updated_time_msstringint64curl -X GET 'https://api.pax.markets/v1/money/fiat-withdrawals/{withdrawal_id}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/fiat-withdrawals/{withdrawal_id}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/fiat-withdrawals/{withdrawal_id}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/fiat-withdrawals/{withdrawal_id}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"withdrawal": {
"id": "",
"idempotency_key": "",
"bank_account_id": "",
"transfer_method": 1,
"currency": "",
"amount": "0",
"fee_currency": "",
"fee": "0",
"memo": "",
"status": 0,
"reference": "",
"created_time_ms": "0",
"updated_time_ms": "0"
}
}GetFiatWithdrawalByIdempotencyKey
Path Parameters
idempotency_keystringResponse
A successful response.
withdrawalobject+ Show 13 properties
idstringidempotency_keystringbank_account_idstringtransfer_methodenumcurrencystringamountstringint64fee_currencystringfeestringint64memostringstatusenumreferencestringcreated_time_msstringint64updated_time_msstringint64curl -X GET 'https://api.pax.markets/v1/money/fiat-withdrawals-by-idempotency-key/{idempotency_key}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/fiat-withdrawals-by-idempotency-key/{idempotency_key}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/fiat-withdrawals-by-idempotency-key/{idempotency_key}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/fiat-withdrawals-by-idempotency-key/{idempotency_key}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"withdrawal": {
"id": "",
"idempotency_key": "",
"bank_account_id": "",
"transfer_method": 1,
"currency": "",
"amount": "0",
"fee_currency": "",
"fee": "0",
"memo": "",
"status": 0,
"reference": "",
"created_time_ms": "0",
"updated_time_ms": "0"
}
}GetCryptoTransfers
Response
A successful response.
transfersobject[]+ Show 14 properties
idstringtypeenumchainstringassetenumamountstringint64fee_tokenstringfeestringint64sender_wallet_addressstringreceiver_wallet_addressstringdeposit_statusenumwithdrawal_statusenumtransaction_hashstringcreated_time_msstringint64updated_time_msstringint64curl -X GET 'https://api.pax.markets/v1/money/crypto-transfers' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/crypto-transfers"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/crypto-transfers";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/crypto-transfers";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"transfers": [
{
"id": "",
"type": 1,
"chain": "",
"asset": 1,
"amount": "0",
"fee_token": "",
"fee": "0",
"sender_wallet_address": "",
"receiver_wallet_address": "",
"deposit_status": 1,
"withdrawal_status": 1,
"transaction_hash": "",
"created_time_ms": "0",
"updated_time_ms": "0"
}
]
}GetConversions
Response
A successful response.
conversionsobject[]+ Show 10 properties
idstringstatusenumfrom_assetenumfrom_amountstringint64to_assetenumto_amountstringint64created_time_msstringint64updated_time_msstringint64fee_assetenumfee_amountstringint64curl -X GET 'https://api.pax.markets/v1/money/conversions' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/conversions"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/conversions";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/conversions";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"conversions": [
{
"id": "",
"status": 1,
"from_asset": 1,
"from_amount": "0",
"to_asset": 1,
"to_amount": "0",
"created_time_ms": "0",
"updated_time_ms": "0",
"fee_asset": 1,
"fee_amount": "0"
}
]
}GetConversion
Path Parameters
conversion_idstringResponse
A successful response.
conversionobject+ Show 10 properties
idstringstatusenumfrom_assetenumfrom_amountstringint64to_assetenumto_amountstringint64created_time_msstringint64updated_time_msstringint64fee_assetenumfee_amountstringint64curl -X GET 'https://api.pax.markets/v1/money/conversions/{conversion_id}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "GET"
path = "/v1/money/conversions/{conversion_id}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.get(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "GET";
let path = "/v1/money/conversions/{conversion_id}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.get(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "GET";
const path = "/v1/money/conversions/{conversion_id}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "GET",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
},
});
console.log(await res.json());{
"conversion": {
"id": "",
"status": 1,
"from_asset": 1,
"from_amount": "0",
"to_asset": 1,
"to_amount": "0",
"created_time_ms": "0",
"updated_time_ms": "0",
"fee_asset": 1,
"fee_amount": "0"
}
}ArchiveWithdrawWallet
Path Parameters
withdraw_wallet_idstringResponse
A successful response.
curl -X DELETE 'https://api.pax.markets/v1/money/withdraw-wallets/{withdraw_wallet_id}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "DELETE"
path = "/v1/money/withdraw-wallets/{withdraw_wallet_id}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.delete(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "DELETE";
let path = "/v1/money/withdraw-wallets/{withdraw_wallet_id}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.delete(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "DELETE";
const path = "/v1/money/withdraw-wallets/{withdraw_wallet_id}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "DELETE",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
});
console.log(await res.json());ArchiveWithdrawBankAccount
Path Parameters
withdraw_bank_account_idstringResponse
A successful response.
curl -X DELETE 'https://api.pax.markets/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "DELETE"
path = "/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}"
body = ""
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.delete(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
}
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "DELETE";
let path = "/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}";
let body = "";
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.delete(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "DELETE";
const path = "/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}";
const body = "";
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "DELETE",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
});
console.log(await res.json());CancelOrder
Cancel the named order's unfilled quantity at its side and price level. This is a liquidity cancel, so the quantity may come off any of the account's orders at that level.
Request
order_idstringOrder whose unfilled quantity, side and price level set the cancel.
client_order_idstringOptionalClient-supplied id for the cancel, at most 36 bytes.
Response
A successful response.
order_idstringExchange-assigned id of the cancel order, not of the order named in the request.
curl -X POST 'https://api.pax.markets/v1/compatibility/order/cancel' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"order_id": "",
"client_order_id": ""
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/compatibility/order/cancel"
body = json.dumps({
"order_id": "",
"client_order_id": ""
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/compatibility/order/cancel";
let body = serde_json::to_string(&serde_json::json!({
"order_id": "",
"client_order_id": ""
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/compatibility/order/cancel";
const body = JSON.stringify({
"order_id": "",
"client_order_id": ""
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"order_id": "string"
}BatchSubmitOrders
Place several orders in one request. Entries that fail validation or are rejected are skipped rather than failing the batch.
Request
ordersobject[]OptionalList of orders to place, in the order given. At most 10 per request.
+ Show 2 properties
orderobjectThe order to place.
+ Show 6 properties
sideenumSide to place on.
ASKSell the base asset.BIDBuy the base asset.market_idstringuint64Market to place on.
qtystringint64Quantity to place, a multiple of the market's step size. Must be positive except on a cancel lambda.
ticksintegerint32Limit price in ticks, from 1 to the market's max_ticks.
tifenumHow long the order stays live.
IOCFill what can be filled right away, cancel the rest. Never rests on the book.GTCRest on the book until filled or canceled.is_leveragebooleanTrade on margin. Currently disabled.
client_order_idstringOptionalClient-supplied id, at most 36 bytes. Rejected if it matches another of the account's live orders.
Response
A successful response.
order_idsstring[]List of exchange-assigned order ids, one per accepted order, in request order. Skipped entries are absent.
curl -X POST 'https://api.pax.markets/v1/compatibility/order/submit-batch' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"orders": [
{
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"client_order_id": ""
}
]
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/compatibility/order/submit-batch"
body = json.dumps({
"orders": [
{
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": False
},
"client_order_id": ""
}
]
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/compatibility/order/submit-batch";
let body = serde_json::to_string(&serde_json::json!({
"orders": [
{
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"client_order_id": ""
}
]
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/compatibility/order/submit-batch";
const body = JSON.stringify({
"orders": [
{
"order": {
"side": 1,
"market_id": "0",
"qty": "0",
"ticks": 0,
"tif": 1,
"is_leverage": false
},
"client_order_id": ""
}
]
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"order_ids": []
}BatchCancelOrders
Run several CancelOrder liquidity cancels in one request. Entries that cannot be canceled are skipped rather than failing the batch.
Request
ordersobject[]OptionalList of cancels to apply, in the order given. At most 10 per request.
+ Show 2 properties
order_idstringOrder whose unfilled quantity, side and price level set the cancel.
client_order_idstringOptionalClient-supplied id for the cancel, at most 36 bytes.
Response
A successful response.
order_idsstring[]List of exchange-assigned cancel order ids, one per accepted cancel, in request order. Skipped entries are absent.
curl -X POST 'https://api.pax.markets/v1/compatibility/order/cancel-batch' \
-H 'api-access-key: <your-key-id>' \
-H 'api-timestamp: <timestamp-ms>' \
-H 'api-signature: <signature>' \
-H 'Content-Type: application/json' \
-d '{
"orders": [
{
"order_id": "",
"client_order_id": ""
}
]
}'import time, json, base64, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key
KEY_ID = "<your-key-id>"
pk = load_pem_private_key(open("my-private-key.pem", "rb").read(), password=None)
ts = str(int(time.time() * 1000))
method = "POST"
path = "/v1/compatibility/order/cancel-batch"
body = json.dumps({
"orders": [
{
"order_id": "",
"client_order_id": ""
}
]
})
sig = base64.b64encode(pk.sign(f"{ts}{method}{path}{body}".encode())).decode()
response = requests.post(
f"https://api.pax.markets{path}",
headers={
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"Content-Type": "application/json",
},
data=body
)
print(response.json())use ed25519_dalek::{SigningKey, Signer};
use base64::Engine;
use base64::engine::general_purpose::STANDARD;
use std::time::{SystemTime, UNIX_EPOCH};
let key_id = "<your-key-id>";
let signing_key: SigningKey = /* load your Ed25519 private key */;
let ts = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis()
.to_string();
let method = "POST";
let path = "/v1/compatibility/order/cancel-batch";
let body = serde_json::to_string(&serde_json::json!({
"orders": [
{
"order_id": "",
"client_order_id": ""
}
]
})).unwrap();
let message = format!("{}{}{}{}", ts, method, path, body);
let signature = STANDARD.encode(signing_key.sign(message.as_bytes()).to_bytes());
let client = reqwest::Client::new();
let res = client
.post(format!("https://api.pax.markets{path}"))
.header("api-access-key", key_id)
.header("api-timestamp", &ts)
.header("api-signature", &signature)
.header("content-type", "application/json")
.body(body)
.send()
.await?;
println!("{}", res.text().await?);import { readFileSync } from "node:fs";
import { sign } from "node:crypto";
const KEY_ID = "<your-key-id>";
const PRIVATE_KEY = readFileSync("my-private-key.pem", "utf8");
const ts = Date.now().toString();
const method = "POST";
const path = "/v1/compatibility/order/cancel-batch";
const body = JSON.stringify({
"orders": [
{
"order_id": "",
"client_order_id": ""
}
]
});
const sig = sign(null, Buffer.from(ts + method + path + body), PRIVATE_KEY).toString("base64");
const res = await fetch("https://api.pax.markets" + path, {
method: "POST",
headers: {
"api-access-key": KEY_ID,
"api-timestamp": ts,
"api-signature": sig,
"content-type": "application/json",
},
body,
});
console.log(await res.json());{
"order_ids": []
}Regulated services provided by 1Money USA, Inc., a licensed money transmitter, NMLS ID 2628653 · Licenses