Skip to content

REST API Reference

Order API›Order Service

SubmitOrder

POSThttps://api.pax.markets/v1/order/submit

Place a limit order.

Request

orderobject

The order to place.

+ Show 6 properties
sideenum

Side to place on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
market_idstringuint64

Market to place on.

qtystringint64

Quantity to place, a multiple of the market's step size. Must be positive except on a cancel lambda.

ticksintegerint32

Limit price in ticks, from 1 to the market's max_ticks.

tifenum

How long the order stays live.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
is_leverageboolean

Trade on margin. Currently disabled.

client_order_idstringOptional

Client-supplied id, at most 36 bytes. Rejected if it matches another of the account's live orders.

Response

A successful response.

order_idstring

Exchange-assigned order id.

POST/v1/order/submit
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());
200Successful
{
  "order_id": "string"
}

Order API›Order Service

CancelLiquidityOrder

POSThttps://api.pax.markets/v1/order/cancel-liquidity

Cancel a quantity of the account's resting liquidity at one price level.

Request

market_idstringuint64

Market to cancel on.

qtystringint64

Quantity to cancel. Must be positive.

sideenum

Side to cancel on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
ticksintegerint32

Price level to cancel at, in ticks.

client_order_idstringOptional

Client-supplied id for the cancel, at most 36 bytes.

Response

A successful response.

order_idstring

Exchange-assigned id of the cancel order.

POST/v1/order/cancel-liquidity
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());
200Successful
{
  "order_id": "string"
}

Order API›Order Service

CancelAllOrders

POSThttps://api.pax.markets/v1/order/cancel-all

Cancel every resting order for the account, optionally limited to one market.

Request

market_idstringuint64Optional

Cancel 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.

POST/v1/order/cancel-all
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());
200Successful
{
  "order_ids": []
}

Order API›Order Service

BatchSubmitOmniOrders

POSThttps://api.pax.markets/v1/order/submit-batch-omni

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[]Optional

List of entries to apply, in the order given. At most 40 per request.

+ Show 2 properties
message.SubmitOrderobjectOne of

Place an order.

+ Show 2 properties
orderobject

The order to place.

+ Show 6 properties
sideenum

Side to place on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
market_idstringuint64

Market to place on.

qtystringint64

Quantity to place, a multiple of the market's step size. Must be positive except on a cancel lambda.

ticksintegerint32

Limit price in ticks, from 1 to the market's max_ticks.

tifenum

How long the order stays live.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
is_leverageboolean

Trade on margin. Currently disabled.

client_order_idstringOptional

Client-supplied id, at most 36 bytes. Rejected if it matches another of the account's live orders.

message.CancelLiquidityOrderobjectOne of

Cancel resting liquidity at a price level.

+ Show 5 properties
market_idstringuint64

Market to cancel on.

qtystringint64

Quantity to cancel. Must be positive.

sideenum

Side to cancel on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
ticksintegerint32

Price level to cancel at, in ticks.

client_order_idstringOptional

Client-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_idstring

Exchange-assigned order id.

client_order_idstring

The entry's client_order_id. Empty if none was sent.

POST/v1/order/submit-batch-omni
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());
200Successful
{
  "results": [
    {
      "order_id": "",
      "client_order_id": ""
    }
  ]
}

Order API›Order Service

GetActiveOrders

GEThttps://api.pax.markets/v1/order/active

List the account's open orders, whether pending or resting.

Request

market_idstringuint64Optional

Return 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_idstring

Exchange-assigned order id.

client_order_idstring

The order's client_order_id. Empty if none was sent.

orderobject

The order as placed.

+ Show 6 properties
sideenum

Side the order was placed on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
market_idstringuint64

Market the order was placed on.

qtystringint64

Quantity submitted. Negative for a cancel order.

ticksintegerint32

Limit price in ticks.

tifenum

Time in force the order was placed with.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
originenum

What placed the order.

1 = EXOGENOUS2 = LAMBDA3 = ADMIN
EXOGENOUSPlaced directly through the API.
LAMBDAPlaced by a lambda program.
ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.
qty_filled_makestringint64

Quantity filled as maker so far.

qty_filled_takestringint64

Quantity filled as taker so far.

qty_canceledstringint64

Quantity canceled so far.

GET/v1/order/active
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());
200Successful
{
  "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"
    }
  ]
}

Order API›Order Service

GetOrder

GEThttps://api.pax.markets/v1/order/{order_id}

Fetch one order by order_id.

Path Parameters

order_idstring

Id of the order to fetch.

Response

A successful response.

order_idstring

Exchange-assigned order id.

market_idstringuint64

Market the order was placed on.

sideenum

Side the order was placed on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
qtystringint64

Quantity submitted. Negative for a cancel order.

ticksintegerint32

Limit price in ticks.

tifenum

Time in force the order was placed with.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
order_statusenum

Current status.

0 = ORDER_STATUS_UNKNOWN1 = ORDER_STATUS_PENDING2 = ORDER_STATUS_RESTING3 = ORDER_STATUS_FILLED4 = ORDER_STATUS_CANCELED5 = ORDER_STATUS_PARTIAL6 = ORDER_STATUS_REJECTED
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.
originenum

What placed the order.

1 = EXOGENOUS2 = LAMBDA3 = ADMIN
EXOGENOUSPlaced directly through the API.
LAMBDAPlaced by a lambda program.
ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.
qty_filled_makestringint64

Quantity filled as maker.

qty_filled_takestringint64

Quantity filled as taker.

qty_canceledstringint64

Quantity canceled.

fill_valuestringint64

Total value filled, in the quote asset's native units.

client_order_idstring

Client-supplied id from the submit request.

created_time_msstringint64

When the order was accepted, in Unix milliseconds.

updated_time_msstringint64

When the order last changed, in Unix milliseconds.

GET/v1/order/{order_id}
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());
200Successful
{
  "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"
}

Order API›Order Service

GetOrders

GEThttps://api.pax.markets/v1/order/list

List the account's orders, newest first, optionally narrowed to one market and one status.

Request

limitintegerint32Optional

Maximum orders to return, from 1 to 1000. Defaults to 1000.

cursorstringOptional

Cursor from the previous response's next_cursor. Omit for the first page.

order_statusenumOptional

Return only orders in this status.

0 = ORDER_STATUS_UNKNOWN1 = ORDER_STATUS_PENDING2 = ORDER_STATUS_RESTING3 = ORDER_STATUS_FILLED4 = ORDER_STATUS_CANCELED5 = ORDER_STATUS_PARTIAL6 = ORDER_STATUS_REJECTED
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_idstringuint64Optional

Return only orders on this market. Omit for every market.

Response

A successful response.

ordersobject[]

List of orders on this page.

+ Show 15 properties
order_idstring

Exchange-assigned order id.

market_idstringuint64

Market the order was placed on.

sideenum

Side the order was placed on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
qtystringint64

Quantity submitted. Negative for a cancel order.

ticksintegerint32

Limit price in ticks.

tifenum

Time in force the order was placed with.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
order_statusenum

Current status.

0 = ORDER_STATUS_UNKNOWN1 = ORDER_STATUS_PENDING2 = ORDER_STATUS_RESTING3 = ORDER_STATUS_FILLED4 = ORDER_STATUS_CANCELED5 = ORDER_STATUS_PARTIAL6 = ORDER_STATUS_REJECTED
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.
originenum

What placed the order.

1 = EXOGENOUS2 = LAMBDA3 = ADMIN
EXOGENOUSPlaced directly through the API.
LAMBDAPlaced by a lambda program.
ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.
qty_filled_makestringint64

Quantity filled as maker.

qty_filled_takestringint64

Quantity filled as taker.

qty_canceledstringint64

Quantity canceled.

fill_valuestringint64

Total value filled, in the quote asset's native units.

client_order_idstring

Client-supplied id from the submit request.

created_time_msstringint64

When the order was accepted, in Unix milliseconds.

updated_time_msstringint64

When the order last changed, in Unix milliseconds.

next_cursorstring

Pass as cursor to fetch the next page. Absent on the last page.

GET/v1/order/list
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());
200Successful
{
  "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"
}

Order API›Order Service

GetOrderStatusUpdates

GEThttps://api.pax.markets/v1/order/status-updates

Read the full status update history of one order. Updates can take up to 15 minutes to appear here.

Request

order_idstring

Order whose history to read.

limitintegerint32Optional

Maximum updates to return, from 1 to 1000. Defaults to 1000.

cursorstringOptional

Cursor 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
osuobject

The status update, as streamed.

+ Show 11 properties
osu_idstring

Id of this status update. Empty when the order was rejected before an update id was assigned.

order_idstring

Order this update belongs to. Empty when the order was rejected before an order id was assigned.

client_order_idstring

The order's client_order_id. Empty if none was sent.

qty_filled_makestringint64

Quantity filled as maker in this update.

qty_filled_takestringint64

Quantity filled as taker in this update.

qty_canceledstringint64

Quantity canceled in this update.

fill_valuestringint64

Value filled in this update, in the quote asset's native units.

fee_rebatestringint64

Rebate paid, or fee charged when negative, in the quote asset's native units.

orderobject

The order as placed.

+ Show 6 properties
sideenum

Side the order was placed on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
market_idstringuint64

Market the order was placed on.

qtystringint64

Quantity submitted. Negative for a cancel order.

ticksintegerint32

Limit price in ticks.

tifenum

Time in force the order was placed with.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
originenum

What placed the order.

1 = EXOGENOUS2 = LAMBDA3 = ADMIN
EXOGENOUSPlaced directly through the API.
LAMBDAPlaced by a lambda program.
ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.
order_statusenum

Order status after this update.

0 = ORDER_STATUS_UNKNOWN1 = ORDER_STATUS_PENDING2 = ORDER_STATUS_RESTING3 = ORDER_STATUS_FILLED4 = ORDER_STATUS_CANCELED5 = ORDER_STATUS_PARTIAL6 = ORDER_STATUS_REJECTED
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.
reasonenum

Why the system refused or canceled the order, if it did.

0 = OSU_REASON_UNSPECIFIED1 = OSU_REASON_ADMIN_CANCELED2 = OSU_REASON_INSUFFICIENT_BALANCE3 = OSU_REASON_DUPLICATE_CLIENT_ID4 = OSU_REASON_EXCHANGE_ERROR
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_msstringint64

When this update happened, in Unix milliseconds.

next_cursorstring

Pass as cursor to fetch the next page. Absent on the last page.

GET/v1/order/status-updates
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());
200Successful
{
  "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"
}

Order API›Order Service

GetRecentFillOrderStatusUpdates

GEThttps://api.pax.markets/v1/order/status-updates/fills/recent

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_idstringuint64Optional

Return only updates for orders on this market.

limitintegerint32Optional

Maximum updates to return, from 1 to 1000. Defaults to 1000.

cursorstringOptional

Cursor 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
osuobject

The status update, as streamed.

+ Show 11 properties
osu_idstring

Id of this status update. Empty when the order was rejected before an update id was assigned.

order_idstring

Order this update belongs to. Empty when the order was rejected before an order id was assigned.

client_order_idstring

The order's client_order_id. Empty if none was sent.

qty_filled_makestringint64

Quantity filled as maker in this update.

qty_filled_takestringint64

Quantity filled as taker in this update.

qty_canceledstringint64

Quantity canceled in this update.

fill_valuestringint64

Value filled in this update, in the quote asset's native units.

fee_rebatestringint64

Rebate paid, or fee charged when negative, in the quote asset's native units.

orderobject

The order as placed.

+ Show 6 properties
sideenum

Side the order was placed on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
market_idstringuint64

Market the order was placed on.

qtystringint64

Quantity submitted. Negative for a cancel order.

ticksintegerint32

Limit price in ticks.

tifenum

Time in force the order was placed with.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
originenum

What placed the order.

1 = EXOGENOUS2 = LAMBDA3 = ADMIN
EXOGENOUSPlaced directly through the API.
LAMBDAPlaced by a lambda program.
ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.
order_statusenum

Order status after this update.

0 = ORDER_STATUS_UNKNOWN1 = ORDER_STATUS_PENDING2 = ORDER_STATUS_RESTING3 = ORDER_STATUS_FILLED4 = ORDER_STATUS_CANCELED5 = ORDER_STATUS_PARTIAL6 = ORDER_STATUS_REJECTED
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.
reasonenum

Why the system refused or canceled the order, if it did.

0 = OSU_REASON_UNSPECIFIED1 = OSU_REASON_ADMIN_CANCELED2 = OSU_REASON_INSUFFICIENT_BALANCE3 = OSU_REASON_DUPLICATE_CLIENT_ID4 = OSU_REASON_EXCHANGE_ERROR
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_msstringint64

When this update happened, in Unix milliseconds.

next_cursorstring

Pass as cursor to page further back. Absent on the last page.

GET/v1/order/status-updates/fills/recent
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());
200Successful
{
  "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"
}

Order API›Order Service

GetFillOrderStatusUpdatesSince

GEThttps://api.pax.markets/v1/order/status-updates/fills/since

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_msstringint64

Return updates at or after this time, in Unix milliseconds.

market_idstringuint64Optional

Return only updates for orders on this market.

limitintegerint32Optional

Maximum updates to return, from 1 to 1000. Defaults to 1000.

cursorstringOptional

Cursor 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
osuobject

The status update, as streamed.

+ Show 11 properties
osu_idstring

Id of this status update. Empty when the order was rejected before an update id was assigned.

order_idstring

Order this update belongs to. Empty when the order was rejected before an order id was assigned.

client_order_idstring

The order's client_order_id. Empty if none was sent.

qty_filled_makestringint64

Quantity filled as maker in this update.

qty_filled_takestringint64

Quantity filled as taker in this update.

qty_canceledstringint64

Quantity canceled in this update.

fill_valuestringint64

Value filled in this update, in the quote asset's native units.

fee_rebatestringint64

Rebate paid, or fee charged when negative, in the quote asset's native units.

orderobject

The order as placed.

+ Show 6 properties
sideenum

Side the order was placed on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
market_idstringuint64

Market the order was placed on.

qtystringint64

Quantity submitted. Negative for a cancel order.

ticksintegerint32

Limit price in ticks.

tifenum

Time in force the order was placed with.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
originenum

What placed the order.

1 = EXOGENOUS2 = LAMBDA3 = ADMIN
EXOGENOUSPlaced directly through the API.
LAMBDAPlaced by a lambda program.
ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.
order_statusenum

Order status after this update.

0 = ORDER_STATUS_UNKNOWN1 = ORDER_STATUS_PENDING2 = ORDER_STATUS_RESTING3 = ORDER_STATUS_FILLED4 = ORDER_STATUS_CANCELED5 = ORDER_STATUS_PARTIAL6 = ORDER_STATUS_REJECTED
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.
reasonenum

Why the system refused or canceled the order, if it did.

0 = OSU_REASON_UNSPECIFIED1 = OSU_REASON_ADMIN_CANCELED2 = OSU_REASON_INSUFFICIENT_BALANCE3 = OSU_REASON_DUPLICATE_CLIENT_ID4 = OSU_REASON_EXCHANGE_ERROR
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_msstringint64

When this update happened, in Unix milliseconds.

next_cursorstring

Pass as cursor to fetch the next page. Absent on the last page.

GET/v1/order/status-updates/fills/since
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());
200Successful
{
  "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"
}

Lambda API›Lambda Service

SubmitLambda

POSThttps://api.pax.markets/v1/lambda/submit

Submit a lambda program. Requires a LAMBDA account.

Request

lambda_programobject

The lambda program to submit.

+ Show 3 properties
orderobject

The order to place when the predicate is met. A negative qty with tif IOC cancels that much liquidity instead.

+ Show 6 properties
sideenum

Side to place on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
market_idstringuint64

Market to place on.

qtystringint64

Quantity to place, a multiple of the market's step size. Must be positive except on a cancel lambda.

ticksintegerint32

Limit price in ticks, from 1 to the market's max_ticks.

tifenum

How long the order stays live.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
is_leverageboolean

Trade on margin. Currently disabled.

predicateobject

Condition that triggers the lambda program.

+ Show 2 properties
index_dataobject

Which events to watch.

+ Show 3 properties
pred_sideenum

Side of the book to watch.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
pred_typeenum

Kind of book event to watch for.

1 = LIQ_ADD2 = LIQ_RMD3 = IM_MISS
LIQ_ADDLiquidity arriving on the book.
LIQ_RMDLiquidity leaving the book.
IM_MISSAn IOC order that found nothing to fill against.
market_idstringuint64

Market to watch.

match_dataobject

Which of those events qualify.

+ Show 7 properties
pred_qualenum

Which liquidity-removal events qualify.

1 = ANY2 = EX3 = CX4 = XA
ANYAny removal.
EXRemoval by execution.
CXRemoval by cancel.
XAA crossing order that removes opposite-side liquidity and rests the remainder.
ticks_typeenum

How the tick bounds are interpreted.

1 = ABS_TICKS2 = DELTA_GT_BEST_ASK3 = DELTA_LT_BEST_BID4 = MID_PX_CHANGE_ABS5 = MID_PX_CHANGE_SGN
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_typeenum

How the quantity bounds are interpreted.

1 = LEVEL_QTY2 = DELTA_QTY
LEVEL_QTYMatch the quantity resting at the event's price level.
DELTA_QTYMatch the change in quantity the event caused.
min_ticksintegerint32

Lowest tick that qualifies.

max_ticksintegerint32

Highest tick that qualifies.

min_qtystringint64

Smallest quantity that qualifies.

max_qtystringint64

Largest quantity that qualifies.

lr_paramsobject

How the triggered order's quantity and price are chosen.

+ Show 3 properties
lr_qty_typeenum

How the triggered order's quantity is chosen.

1 = ENTIRE2 = PARTIAL3 = OPP_TOB_QTY4 = DELTA_QTY_RMD5 = PERMANENT6 = MM_CX_PREV
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_qtystringint64

Quantity used when lr_qty_type is PARTIAL.

lr_ticks_typeenum

How the triggered order's price is chosen.

1 = TICKS_ABS2 = TICKS_DELTA
TICKS_ABSUse the order's absolute tick price.
TICKS_DELTAOffset the event's price by the order's ticks. Not yet available.
client_lambda_idstringOptional

Client-supplied id, at most 36 bytes. Rejected if it matches another of the account's live lambda programs.

Response

A successful response.

lambda_idstring

Exchange-assigned lambda id.

POST/v1/lambda/submit
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());
200Successful
{
  "lambda_id": "string"
}

Lambda API›Lambda Service

SubmitRemoteLambda

POSThttps://api.pax.markets/v1/lambda/submit-remote

Not yet available.

Request

remote_lambda_programobject

The lambda program to submit.

+ Show 3 properties
orderobject

The order to place when the predicate is met.

+ Show 6 properties
sideenum

Side to place on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
market_idstringuint64

Market to place on.

qtystringint64

Quantity to place, a multiple of the market's step size. Must be positive except on a cancel lambda.

ticksintegerint32

Limit price in ticks, from 1 to the market's max_ticks.

tifenum

How long the order stays live.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
is_leverageboolean

Trade on margin. Currently disabled.

predicateobject

Condition that triggers the lambda program.

+ Show 2 properties
index_dataobject

Which remote events to watch.

+ Show 2 properties
event_typeenum

Kind of remote event to watch for.

1 = MIDPX2 = TRADE
MIDPXMid-price tick on the remote venue.
TRADETrade execution on the remote venue.
market_idstringuint64

Market to watch.

match_dataobject

Which of those events qualify.

+ Show 5 properties
ticks_typeenum

How the tick bounds are interpreted.

1 = ABS_TICKS2 = DELTA_GT_BEST_ASK3 = DELTA_LT_BEST_BID4 = MID_PX_CHANGE_ABS5 = MID_PX_CHANGE_SGN
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.
venueenum

Remote venue whose feed to watch.

1 = ANY_VENUE2 = BN3 = CB4 = KN5 = OKX6 = BYB
ANY_VENUEAny available venue.
BNBinance.
CBCoinbase.
KNKraken.
OKXOKX.
BYBBybit.
min_ticksintegerint32

Lowest tick that qualifies.

max_ticksintegerint32

Highest tick that qualifies.

ref_ticksintegerint32

Reference price in ticks for relative bounds.

lr_paramsobject

How the triggered order's quantity and price are chosen.

+ Show 3 properties
lr_qty_typeenum

How the triggered order's quantity is chosen.

1 = ENTIRE2 = PARTIAL3 = OPP_TOB_QTY4 = DELTA_QTY_RMD5 = PERMANENT6 = MM_CX_PREV
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_qtystringint64

Quantity used when lr_qty_type is PARTIAL.

lr_ticks_typeenum

How the triggered order's price is chosen.

1 = TICKS_ABS2 = TICKS_DELTA
TICKS_ABSUse the order's absolute tick price.
TICKS_DELTAOffset the event's price by the order's ticks. Not yet available.
client_lambda_idstringOptional

Client-supplied id, at most 36 bytes. Rejected if it matches another of the account's live lambda programs.

Response

A successful response.

lambda_idstring

Exchange-assigned lambda id.

POST/v1/lambda/submit-remote
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());
200Successful
{
  "lambda_id": "string"
}

Lambda API›Lambda Service

CancelLambda

POSThttps://api.pax.markets/v1/lambda/cancel

Cancel a lambda program, releasing its untriggered quantity.

Request

lambda_idstring

Id of the lambda program to cancel.

client_cancel_idstringOptional

Client-supplied id for the cancel, at most 36 bytes.

Response

A successful response.

cancel_lambda_idstring

Exchange-assigned id of the cancel, not of the lambda program being canceled.

POST/v1/lambda/cancel
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());
200Successful
{
  "cancel_lambda_id": "string"
}

Lambda API›Lambda Service

GetRecentLambdaStatusUpdates

GEThttps://api.pax.markets/v1/lambda/status-updates/recent

Read the account's most recent lambda status updates, newest first. Covers the last 10,000 updates per account.

Request

limitintegerint32Optional

Maximum updates to return, from 1 to 1000. Defaults to 1000.

cursorstringOptional

Cursor 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
lsuobject

The status update, as streamed.

+ Show 6 properties
lsu_idstring

Id of this status update.

lambda_idstring

Lambda program this update belongs to. Empty when the lambda submission was rejected before a lambda id was assigned.

client_lambda_idstring

The lambda program's client_lambda_id. Empty if none was sent.

delta_qtystringint64

Change in the lambda program's untriggered quantity. Negative when it triggers or is canceled.

statusenum

Status the lambda program moved to.

1 = LAMBDA_STATUS_PENDING2 = LAMBDA_STATUS_IN_FORCE3 = LAMBDA_STATUS_OUT_OF_FORCE4 = LAMBDA_STATUS_REJECTED
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.
reasonenum

Why the lambda program moved to that status.

1 = PROGRAMMED2 = CANCELED3 = MODIFIED4 = EXHAUSTED5 = SYSTEM_RESTART6 = INSUFFICIENT_BALANCE7 = DUPLICATE_CLIENT_ID8 = INVALID_LAMBDA9 = EXCHANGE_ERROR
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_msstringint64

When this update happened, in Unix milliseconds.

next_cursorstring

Pass as cursor to page further back. Absent on the last page.

GET/v1/lambda/status-updates/recent
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());
200Successful
{
  "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"
}

Lambda API›Lambda Service

GetLambdaStatusUpdatesSince

GEThttps://api.pax.markets/v1/lambda/status-updates/since

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_msstringint64

Return updates at or after this time, in Unix milliseconds.

limitintegerint32Optional

Maximum updates to return, from 1 to 1000. Defaults to 1000.

cursorstringOptional

Cursor 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
lsuobject

The status update, as streamed.

+ Show 6 properties
lsu_idstring

Id of this status update.

lambda_idstring

Lambda program this update belongs to. Empty when the lambda submission was rejected before a lambda id was assigned.

client_lambda_idstring

The lambda program's client_lambda_id. Empty if none was sent.

delta_qtystringint64

Change in the lambda program's untriggered quantity. Negative when it triggers or is canceled.

statusenum

Status the lambda program moved to.

1 = LAMBDA_STATUS_PENDING2 = LAMBDA_STATUS_IN_FORCE3 = LAMBDA_STATUS_OUT_OF_FORCE4 = LAMBDA_STATUS_REJECTED
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.
reasonenum

Why the lambda program moved to that status.

1 = PROGRAMMED2 = CANCELED3 = MODIFIED4 = EXHAUSTED5 = SYSTEM_RESTART6 = INSUFFICIENT_BALANCE7 = DUPLICATE_CLIENT_ID8 = INVALID_LAMBDA9 = EXCHANGE_ERROR
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_msstringint64

When this update happened, in Unix milliseconds.

next_cursorstring

Pass as cursor to fetch the next page. Absent on the last page.

GET/v1/lambda/status-updates/since
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());
200Successful
{
  "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"
}

Lambda API›Lambda Service

GetLambdaStatusUpdates

GEThttps://api.pax.markets/v1/lambda/status-updates

Read the full status update history of one lambda program. Updates can take up to 15 minutes to appear here.

Request

lambda_idstring

Lambda program whose history to read.

limitintegerint32Optional

Maximum updates to return, from 1 to 1000. Defaults to 1000.

cursorstringOptional

Cursor 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
lsuobject

The status update, as streamed.

+ Show 6 properties
lsu_idstring

Id of this status update.

lambda_idstring

Lambda program this update belongs to. Empty when the lambda submission was rejected before a lambda id was assigned.

client_lambda_idstring

The lambda program's client_lambda_id. Empty if none was sent.

delta_qtystringint64

Change in the lambda program's untriggered quantity. Negative when it triggers or is canceled.

statusenum

Status the lambda program moved to.

1 = LAMBDA_STATUS_PENDING2 = LAMBDA_STATUS_IN_FORCE3 = LAMBDA_STATUS_OUT_OF_FORCE4 = LAMBDA_STATUS_REJECTED
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.
reasonenum

Why the lambda program moved to that status.

1 = PROGRAMMED2 = CANCELED3 = MODIFIED4 = EXHAUSTED5 = SYSTEM_RESTART6 = INSUFFICIENT_BALANCE7 = DUPLICATE_CLIENT_ID8 = INVALID_LAMBDA9 = EXCHANGE_ERROR
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_msstringint64

When this update happened, in Unix milliseconds.

next_cursorstring

Pass as cursor to fetch the next page. Absent on the last page.

GET/v1/lambda/status-updates
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());
200Successful
{
  "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"
}

Lambda API›Lambda Service

GetLambda

GEThttps://api.pax.markets/v1/lambda/{lambda_id}

Fetch one lambda program by lambda_id.

Path Parameters

lambda_idstring

Id of the lambda program to fetch.

Response

A successful response.

lambda_idstring

Exchange-assigned lambda id.

market_idstringuint64

Market the lambda program places its order on.

sideenum

Side of the order the lambda program places.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
qtystringint64

Quantity the lambda program was submitted with. Negative for a cancel lambda.

ticksintegerint32

Limit price of the order the lambda program places, in ticks.

tifenum

Time in force of the order the lambda program places.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
is_leverageboolean

Trade on margin. Currently disabled.

predicate_index_datastring

The predicate's index_data, as a JSON string.

predicate_match_datastring

The predicate's match_data, as a JSON string.

lr_qty_typeenum

How the triggered order's quantity is chosen.

1 = ENTIRE2 = PARTIAL3 = OPP_TOB_QTY4 = DELTA_QTY_RMD5 = PERMANENT6 = MM_CX_PREV
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_qtystringint64

Quantity used when lr_qty_type is PARTIAL.

lr_ticks_typeenum

How the triggered order's price is chosen.

1 = TICKS_ABS2 = TICKS_DELTA
TICKS_ABSUse the order's absolute tick price.
TICKS_DELTAOffset the event's price by the order's ticks. Not yet available.
lambda_statusenum

Current status of the lambda program.

1 = LAMBDA_STATUS_PENDING2 = LAMBDA_STATUS_IN_FORCE3 = LAMBDA_STATUS_OUT_OF_FORCE4 = LAMBDA_STATUS_REJECTED
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_triggeredstringint64

Quantity the lambda program has triggered so far.

is_remoteboolean

Whether the predicate watches a remote venue.

created_time_msstringint64

When the lambda program was submitted, in Unix milliseconds.

updated_time_msstringint64

When the lambda program last changed, in Unix milliseconds.

client_lambda_idstring

Client-supplied id from the submit request.

GET/v1/lambda/{lambda_id}
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());
200Successful
{
  "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"
}

Lambda API›Lambda Service

GetLambdas

GEThttps://api.pax.markets/v1/lambda/list

List the account's lambda programs, newest first, optionally narrowed to one market and one status.

Request

lambda_statusenumOptional

Return only lambda programs in this status.

1 = LAMBDA_STATUS_PENDING2 = LAMBDA_STATUS_IN_FORCE3 = LAMBDA_STATUS_OUT_OF_FORCE4 = LAMBDA_STATUS_REJECTED
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_idstringuint64Optional

Return only lambda programs on this market. Omit for every market.

limitintegerint32Optional

Maximum lambda programs to return, from 1 to 1000. Defaults to 1000.

cursorstringOptional

Cursor 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_idstring

Exchange-assigned lambda id.

market_idstringuint64

Market the lambda program places its order on.

sideenum

Side of the order the lambda program places.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
qtystringint64

Quantity the lambda program was submitted with. Negative for a cancel lambda.

ticksintegerint32

Limit price of the order the lambda program places, in ticks.

tifenum

Time in force of the order the lambda program places.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
is_leverageboolean

Trade on margin. Currently disabled.

predicate_index_datastring

The predicate's index_data, as a JSON string.

predicate_match_datastring

The predicate's match_data, as a JSON string.

lr_qty_typeenum

How the triggered order's quantity is chosen.

1 = ENTIRE2 = PARTIAL3 = OPP_TOB_QTY4 = DELTA_QTY_RMD5 = PERMANENT6 = MM_CX_PREV
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_qtystringint64

Quantity used when lr_qty_type is PARTIAL.

lr_ticks_typeenum

How the triggered order's price is chosen.

1 = TICKS_ABS2 = TICKS_DELTA
TICKS_ABSUse the order's absolute tick price.
TICKS_DELTAOffset the event's price by the order's ticks. Not yet available.
lambda_statusenum

Current status of the lambda program.

1 = LAMBDA_STATUS_PENDING2 = LAMBDA_STATUS_IN_FORCE3 = LAMBDA_STATUS_OUT_OF_FORCE4 = LAMBDA_STATUS_REJECTED
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_triggeredstringint64

Quantity the lambda program has triggered so far.

is_remoteboolean

Whether the predicate watches a remote venue.

created_time_msstringint64

When the lambda program was submitted, in Unix milliseconds.

updated_time_msstringint64

When the lambda program last changed, in Unix milliseconds.

client_lambda_idstring

Client-supplied id from the submit request.

next_cursorstring

Pass as cursor to fetch the next page. Absent on the last page.

GET/v1/lambda/list
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());
200Successful
{
  "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"
}

Lambda API›Lambda Service

GetActiveLambdas

GEThttps://api.pax.markets/v1/lambda/active

List the account's lambda programs currently in force.

Request

market_idstringuint64Optional

Return 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_idstring

Exchange-assigned lambda id.

client_lambda_idstring

The lambda program's client_lambda_id. Empty if none was sent.

orderobject

The order the lambda program places when it triggers.

+ Show 6 properties
sideenum

Side the order was placed on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
market_idstringuint64

Market the order was placed on.

qtystringint64

Quantity submitted. Negative for a cancel order.

ticksintegerint32

Limit price in ticks.

tifenum

Time in force the order was placed with.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
originenum

What placed the order.

1 = EXOGENOUS2 = LAMBDA3 = ADMIN
EXOGENOUSPlaced directly through the API.
LAMBDAPlaced by a lambda program.
ADMINSystem-initiated, such as cancels ahead of maintenance or shutdown.
statusenum

Current status of the lambda program.

1 = LAMBDA_STATUS_PENDING2 = LAMBDA_STATUS_IN_FORCE3 = LAMBDA_STATUS_OUT_OF_FORCE4 = LAMBDA_STATUS_REJECTED
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_remoteboolean

Whether the predicate watches a remote venue.

is_leverageboolean

Trade on margin. Currently disabled.

predicate_index_datastring

The predicate's index_data, as a JSON string.

predicate_match_datastring

The predicate's match_data, as a JSON string.

lr_qty_typeenum

How the triggered order's quantity is chosen.

1 = ENTIRE2 = PARTIAL3 = OPP_TOB_QTY4 = DELTA_QTY_RMD5 = PERMANENT6 = MM_CX_PREV
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_qtystringint64

Quantity used when lr_qty_type is PARTIAL.

lr_ticks_typeenum

How the triggered order's price is chosen.

1 = TICKS_ABS2 = TICKS_DELTA
TICKS_ABSUse the order's absolute tick price.
TICKS_DELTAOffset the event's price by the order's ticks. Not yet available.
GET/v1/lambda/active
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());
200Successful
{
  "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
    }
  ]
}

Lambda API›Lambda Service

GetPendingLambdaCancels

GEThttps://api.pax.markets/v1/lambda/pending-cancels

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_idstring

Lambda program being canceled.

client_cancel_idstring

The cancel's client_cancel_id. Empty if none was sent.

GET/v1/lambda/pending-cancels
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());
200Successful
{
  "pending_cancels": [
    {
      "lambda_id": "",
      "client_cancel_id": ""
    }
  ]
}

Account API›Account Service

CreateApiKey

POSThttps://api.pax.markets/v1/account/create-api-key

Create an API key. Only works from a signed-in session in the PAX app; requests signed with an API key get 403.

Request

descriptionstringOptional
expires_at_unix_secondsstringint64Optional
public_keystring
can_tradeboolean
can_withdrawboolean
account_typeenum
0 = ACCOUNT_TYPE_UNSPECIFIED1 = ACCOUNT_TYPE_FREE2 = ACCOUNT_TYPE_LAMBDA
ip_whiteliststring[]Optional

Response

A successful response.

key_idstring
POST/v1/account/create-api-key
curl -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());
200Successful
{
  "key_id": "string"
}

Account API›Account Service

RevokeApiKey

POSThttps://api.pax.markets/v1/account/revoke-api-key

Request

key_idstring

Response

A successful response.

successboolean
POST/v1/account/revoke-api-key
curl -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());
200Successful
{
  "success": true
}

Account API›Account Service

GetBalance

GEThttps://api.pax.markets/v1/account/get-balance

Request

assetenumOptional
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD

Response

A successful response.

asset_balancesobject[]
+ Show 3 properties
assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
balance_qtystringint64
frozen_qtystringint64
GET/v1/account/get-balance
curl -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());
200Successful
{
  "asset_balances": [
    {
      "asset": 1,
      "balance_qty": "0",
      "frozen_qty": "0"
    }
  ]
}

Account API›Account Service

GetBalancesForMarket

GEThttps://api.pax.markets/v1/account/get-balances-for-market/{market_id}

Path Parameters

market_idstringuint64

Response

A successful response.

asset_balancesobject[]
+ Show 3 properties
assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
balance_qtystringint64
frozen_qtystringint64
GET/v1/account/get-balances-for-market/{market_id}
curl -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());
200Successful
{
  "asset_balances": [
    {
      "asset": 1,
      "balance_qty": "0",
      "frozen_qty": "0"
    }
  ]
}

Account API›Account Service

GetAccountStatus

GEThttps://api.pax.markets/v1/account/status

Response

A successful response.

emailstring
kyc_statusenum
0 = KYC_STATUS_UNSPECIFIED1 = KYC_STATUS_PENDING2 = KYC_STATUS_APPROVED3 = KYC_STATUS_REJECTED4 = KYC_STATUS_MANUAL_REVIEW
kyc_completed_at_unix_secondsstringint64
GET/v1/account/status
curl -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());
200Successful
{
  "email": "string",
  "kyc_status": 0,
  "kyc_completed_at_unix_seconds": "0"
}

Account API›Account Service

ListApiKeys

GEThttps://api.pax.markets/v1/account/api-keys

Response

A successful response.

keysobject[]
+ Show 11 properties
key_idstring
descriptionstring
created_at_unix_secondsstringint64
expires_at_unix_secondsstringint64
revokedboolean
public_keystring
can_tradeboolean
can_withdrawboolean
account_typeenum
0 = ACCOUNT_TYPE_UNSPECIFIED1 = ACCOUNT_TYPE_FREE2 = ACCOUNT_TYPE_LAMBDA
ip_whiteliststring[]
created_by_emailstring

Email of the team member who created the key, when known. Only returned to signed-in sessions.

GET/v1/account/api-keys
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());
200Successful
{
  "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": ""
    }
  ]
}

Account API›Account Service

ListAccounts

GEThttps://api.pax.markets/v1/account/list-accounts

Response

A successful response.

accountsobject[]
+ Show 2 properties
external_account_idstring
account_typeenum
0 = ACCOUNT_TYPE_UNSPECIFIED1 = ACCOUNT_TYPE_FREE2 = ACCOUNT_TYPE_LAMBDA
GET/v1/account/list-accounts
curl -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());
200Successful
{
  "accounts": [
    {
      "external_account_id": "",
      "account_type": 0
    }
  ]
}

Metadata API›Metadata Service

GetExchangeInfo

GEThttps://api.pax.markets/v1/metadata/exchange-info

List the exchange's markets, assets and fee rates.

Response

A successful response.

assetsobject[]

List of all traded assets.

+ Show 4 properties
asset_idstringuint64

Asset id.

asset_namestring

Asset name.

native_unit_namestring

Name of the asset's smallest unit.

num_native_unitsstringint64

Native units in one whole asset.

marketsobject[]

List of all traded markets.

+ Show 13 properties
market_idstringuint64

Market id.

market_namestring

Market name.

market_typeenum

Kind of market.

1 = SPOT
SPOTBuy or sell the base asset outright.
base_asset_idstringuint64

Asset bought or sold.

quote_asset_idstringuint64

Asset paid or received.

qty_unit_namestring

Name of the base asset's native unit.

tick_unit_namestring

Name of the quote asset's native unit.

tick_sizestringuint64

Quote native units per tick.

qty_step_sizestringint64

Base native units per step.

max_qtystringint64

Largest order quantity, in base native units.

notesstring

Additional notes.

max_ticksintegerint32

Highest order price, in ticks.

min_notionalstringint64

Smallest order value at its limit price, in quote native units.

feesobject

Fee and rebate rates, settled per fill in the quote asset.

+ Show 5 properties
lambda_taker_fee_bpsstring

Lambda taker fee, in bps of fill value. Rounded up.

lambda_maker_spread_multiplierstring

Lambda maker fee, as a share of its spread. Rounded up.

lambda_maker_fee_cap_bpsstring

Lambda maker fee cap, in bps of fill value. Rounded up.

free_tier_rebate_multiplierstring

Free-tier rebate, as a share of the lambda counterparty's fee. Rounded down.

free_tier_rebate_cap_bpsstring

Free-tier rebate cap, in bps of fill value. Rounded down.

GET/v1/metadata/exchange-info
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());
200Successful
{
  "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": ""
  }
}

Money API›Money Service

AttributeCryptoDeposit

POSThttps://api.pax.markets/v1/money/crypto-deposits/attributes

Request

crypto_deposit_idstring
originator_countrystring
originator_namestring
origin_wallet_typeenum
1 = CUSTODIAL2 = SELF_HOSTED

Response

A successful response.

POST/v1/money/crypto-deposits/attributes
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());

Money API›Money Service

RegisterWithdrawWallet

POSThttps://api.pax.markets/v1/money/withdraw-wallets

Request

chainstring
wallet_addressstring
wallet_host_typeenum
1 = FINANCIAL_INSTITUTION2 = SELF_HOSTED_WALLET
wallet_host_type_info.InstitutionHostedInfoobjectOne of
+ Show 2 properties
countrystring
namestring
wallet_host_type_info.SelfHostedInfoobjectOne of
+ Show 2 properties
descriptionstring
wallet_ownerenum
1 = MY_ORGANIZATION2 = PERSON_OR_ENTITY
recipient_typeenum
1 = PERSON2 = ENTITY
recipient_type_info.EntityRecipientInfoobjectOne of
+ Show 6 properties
full_namestring
street_addressstring
citystring
statestring
countrystring
zip_codestring
recipient_type_info.PersonRecipientInfoobjectOne of
+ Show 7 properties
first_namestring
last_namestring
street_addressstring
citystring
statestring
countrystring
zip_codestring

Response

A successful response.

statusenum
0 = INITIATED1 = COMPLETED2 = FAILED
POST/v1/money/withdraw-wallets
curl -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());
200Successful
{
  "status": 0
}

Money API›Money Service

SubmitCryptoWithdrawal

POSThttps://api.pax.markets/v1/money/crypto-withdrawals

Request

chainstring
assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
amountstringint64
withdraw_wallet_addressstring
idempotency_keystring

Response

A successful response.

statusenum
1 = QUEUED2 = IN_PROGRESS3 = PENDING_ON_CHAIN4 = COMPLETION_NOTIFIED5 = COMPLETED6 = FAILURE_NOTIFIED7 = FAILED
POST/v1/money/crypto-withdrawals
curl -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());
200Successful
{
  "status": 1
}

Money API›Money Service

RegisterWithdrawUsBankAccount

POSThttps://api.pax.markets/v1/money/withdraw-bank-accounts/us

Request

idempotency_keystring
nicknamestring
transfer_typeenum
1 = ACH2 = WIRE3 = RTP
account_holder_namestring
account_numberstring
routing_numberstring
bank_namestring

Response

A successful response.

statusenum
0 = INITIATED1 = COMPLETED2 = FAILED
POST/v1/money/withdraw-bank-accounts/us
curl -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());
200Successful
{
  "status": 0
}

Money API›Money Service

SubmitFiatWithdrawal

POSThttps://api.pax.markets/v1/money/fiat-withdrawals

Request

idempotency_keystring
currencystring
amountstringint64
withdraw_bank_account_idstring
memostring

Response

A successful response.

statusenum
0 = QUEUED1 = PENDING4 = COMPLETED5 = FAILED6 = RETURNED
POST/v1/money/fiat-withdrawals
curl -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());
200Successful
{
  "status": 0
}

Money API›Money Service

CreateConversionQuote

POSThttps://api.pax.markets/v1/money/conversion-quotes

Request

from_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
to_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
from_amountstringint64

Response

A successful response.

from_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
from_amountstringint64
to_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
to_amountstringint64
valid_until_time_msstringint64
quote_idstring
POST/v1/money/conversion-quotes
curl -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());
200Successful
{
  "from_asset": 1,
  "from_amount": "0",
  "to_asset": 1,
  "to_amount": "0",
  "valid_until_time_ms": "0",
  "quote_id": "string"
}

Money API›Money Service

SubmitConversion

POSThttps://api.pax.markets/v1/money/conversions

Request

idempotency_keystring
from_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
to_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
from_amountstringint64
min_to_amountstringint64
quote_idstring

Response

A successful response.

statusenum
1 = PENDING2 = COMPLETED3 = FAILED
idstring
POST/v1/money/conversions
curl -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());
200Successful
{
  "status": 1,
  "id": "string"
}

Money API›Money Service

GetSupportedChainsForAsset

GEThttps://api.pax.markets/v1/money/assets/{asset}/chains

Path Parameters

assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD

Response

A successful response.

chainsstring[]
GET/v1/money/assets/{asset}/chains
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());
200Successful
{
  "chains": []
}

Money API›Money Service

GetDepositAddresses

GEThttps://api.pax.markets/v1/money/deposit-addresses

Response

A successful response.

deposit_addressesobject[]
+ Show 4 properties
chainstring
assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
addressstring
created_time_msstringint64
GET/v1/money/deposit-addresses
curl -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());
200Successful
{
  "deposit_addresses": [
    {
      "chain": "",
      "asset": 1,
      "address": "",
      "created_time_ms": "0"
    }
  ]
}

Money API›Money Service

GetDepositAddress

GEThttps://api.pax.markets/v1/money/deposit-addresses/{asset}

Path Parameters

assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD

Request

chainstring

Response

A successful response.

deposit_addressobject
+ Show 4 properties
chainstring
assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
addressstring
created_time_msstringint64
GET/v1/money/deposit-addresses/{asset}
curl -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());
200Successful
{
  "deposit_address": {
    "chain": "",
    "asset": 1,
    "address": "",
    "created_time_ms": "0"
  }
}

Money API›Money Service

GetCryptoDeposits

GEThttps://api.pax.markets/v1/money/crypto-deposits

Response

A successful response.

depositsobject[]
+ Show 9 properties
idstring
statusenum
1 = INITIATED2 = PENDING_ATTRIBUTION3 = PENDING_REVIEW4 = COMPLETED5 = BLOCKED6 = FAILED
chainstring
assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
amountstringint64
source_wallet_addressstring
deposit_wallet_addressstring
transaction_hashstring
created_time_msstringint64
GET/v1/money/crypto-deposits
curl -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());
200Successful
{
  "deposits": [
    {
      "id": "",
      "status": 1,
      "chain": "",
      "asset": 1,
      "amount": "0",
      "source_wallet_address": "",
      "deposit_wallet_address": "",
      "transaction_hash": "",
      "created_time_ms": "0"
    }
  ]
}

Money API›Money Service

GetFiatDepositInstructions

GEThttps://api.pax.markets/v1/money/fiat-deposit-instructions

Response

A successful response.

instructionsobject[]
+ Show 12 properties
idstring
bank_networkenum
1 = US_ACH2 = US_WIRE3 = SWIFT4 = US_RTP
currencystring
account_holder_namestring
account_numberstring
bank_namestring
bank_routing_numberstring
bank_swift_codestring
reference_codestring
convert_to_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
deposit_feestringint64
instruction_typeenum
0 = INSTRUCTION_TYPE_UNKNOWN1 = INSTRUCTION_TYPE_DEPOSIT2 = INSTRUCTION_TYPE_AUTO_CONVERSION
GET/v1/money/fiat-deposit-instructions
curl -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());
200Successful
{
  "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
    }
  ]
}

Money API›Money Service

GetFiatDeposits

GEThttps://api.pax.markets/v1/money/fiat-deposits

Response

A successful response.

depositsobject[]
+ Show 9 properties
idstring
statusenum
1 = PENDING2 = COMPLETED3 = FAILED
currencystring
amountstringint64
feestringint64
credited_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
credited_amountstringint64
created_time_msstringint64
bank_networkenum
1 = US_ACH2 = US_WIRE3 = SWIFT4 = US_RTP
GET/v1/money/fiat-deposits
curl -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());
200Successful
{
  "deposits": [
    {
      "id": "",
      "status": 1,
      "currency": "",
      "amount": "0",
      "fee": "0",
      "credited_asset": 1,
      "credited_amount": "0",
      "created_time_ms": "0",
      "bank_network": 1
    }
  ]
}

Money API›Money Service

GetWithdrawWallets

GEThttps://api.pax.markets/v1/money/withdraw-wallets

Request

include_archivedbooleanOptional

Response

A successful response.

walletsobject[]
+ Show 7 properties
idstring
chainstring
addressstring
created_time_msstringint64
archived_time_msstringint64
statusenum
0 = PENDING1 = UNDER_REVIEW2 = VERIFIED
descriptionstring
GET/v1/money/withdraw-wallets
curl -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());
200Successful
{
  "wallets": [
    {
      "id": "",
      "chain": "",
      "address": "",
      "created_time_ms": "0",
      "archived_time_ms": "0",
      "status": 0,
      "description": ""
    }
  ]
}

Money API›Money Service

GetWithdrawWallet

GEThttps://api.pax.markets/v1/money/withdraw-wallets/{withdraw_wallet_id}

Path Parameters

withdraw_wallet_idstring

Response

A successful response.

walletobject
+ Show 7 properties
idstring
chainstring
addressstring
created_time_msstringint64
archived_time_msstringint64
statusenum
0 = PENDING1 = UNDER_REVIEW2 = VERIFIED
descriptionstring
GET/v1/money/withdraw-wallets/{withdraw_wallet_id}
curl -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());
200Successful
{
  "wallet": {
    "id": "",
    "chain": "",
    "address": "",
    "created_time_ms": "0",
    "archived_time_ms": "0",
    "status": 0,
    "description": ""
  }
}

Money API›Money Service

GetWithdrawWalletByAddress

GEThttps://api.pax.markets/v1/money/withdraw-wallets-by-address/{wallet_address}

Path Parameters

wallet_addressstring

Request

chainstring

Response

A successful response.

walletobject
+ Show 7 properties
idstring
chainstring
addressstring
created_time_msstringint64
archived_time_msstringint64
statusenum
0 = PENDING1 = UNDER_REVIEW2 = VERIFIED
descriptionstring
GET/v1/money/withdraw-wallets-by-address/{wallet_address}
curl -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());
200Successful
{
  "wallet": {
    "id": "",
    "chain": "",
    "address": "",
    "created_time_ms": "0",
    "archived_time_ms": "0",
    "status": 0,
    "description": ""
  }
}

Money API›Money Service

GetCryptoWithdrawals

GEThttps://api.pax.markets/v1/money/crypto-withdrawals

Response

A successful response.

withdrawalsobject[]
+ Show 13 properties
idstring
idempotency_keystring
withdraw_wallet_addressstring
chainstring
assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
amountstringint64
fee_tokenstring
feestringint64
statusenum
1 = QUEUED2 = IN_PROGRESS3 = PENDING_ON_CHAIN4 = COMPLETION_NOTIFIED5 = COMPLETED6 = FAILURE_NOTIFIED7 = FAILED
transaction_hashstring
created_time_msstringint64
updated_time_msstringint64
received_amountstringint64
GET/v1/money/crypto-withdrawals
curl -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());
200Successful
{
  "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"
    }
  ]
}

Money API›Money Service

GetCryptoWithdrawal

GEThttps://api.pax.markets/v1/money/crypto-withdrawals/{withdrawal_id}

Path Parameters

withdrawal_idstring

Response

A successful response.

withdrawalobject
+ Show 13 properties
idstring
idempotency_keystring
withdraw_wallet_addressstring
chainstring
assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
amountstringint64
fee_tokenstring
feestringint64
statusenum
1 = QUEUED2 = IN_PROGRESS3 = PENDING_ON_CHAIN4 = COMPLETION_NOTIFIED5 = COMPLETED6 = FAILURE_NOTIFIED7 = FAILED
transaction_hashstring
created_time_msstringint64
updated_time_msstringint64
received_amountstringint64
GET/v1/money/crypto-withdrawals/{withdrawal_id}
curl -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());
200Successful
{
  "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"
  }
}

Money API›Money Service

GetCryptoWithdrawalByIdempotencyKey

GEThttps://api.pax.markets/v1/money/crypto-withdrawals-by-idempotency-key/{idempotency_key}

Path Parameters

idempotency_keystring

Response

A successful response.

withdrawalobject
+ Show 13 properties
idstring
idempotency_keystring
withdraw_wallet_addressstring
chainstring
assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
amountstringint64
fee_tokenstring
feestringint64
statusenum
1 = QUEUED2 = IN_PROGRESS3 = PENDING_ON_CHAIN4 = COMPLETION_NOTIFIED5 = COMPLETED6 = FAILURE_NOTIFIED7 = FAILED
transaction_hashstring
created_time_msstringint64
updated_time_msstringint64
received_amountstringint64
GET/v1/money/crypto-withdrawals-by-idempotency-key/{idempotency_key}
curl -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());
200Successful
{
  "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"
  }
}

Money API›Money Service

GetWithdrawBankAccounts

GEThttps://api.pax.markets/v1/money/withdraw-bank-accounts

Request

include_archivedbooleanOptional

Response

A successful response.

bank_accountsobject[]
+ Show 5 properties
bank_account_typeenum
1 = US
us_bank_accountobject
+ Show 7 properties
idstring
nicknamestring
transfer_typeenum
1 = ACH2 = WIRE3 = RTP
account_holder_namestring
account_numberstring
bank_namestring
bank_routing_numberstring
statusenum
0 = STATUS_UNKNOWN1 = PENDING2 = ACTIVE3 = FAILED4 = INACTIVE
created_time_msstringint64
archived_time_msstringint64
GET/v1/money/withdraw-bank-accounts
curl -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());
200Successful
{
  "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"
    }
  ]
}

Money API›Money Service

GetWithdrawBankAccount

GEThttps://api.pax.markets/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}

Path Parameters

withdraw_bank_account_idstring

Response

A successful response.

bank_accountobject
+ Show 5 properties
bank_account_typeenum
1 = US
us_bank_accountobject
+ Show 7 properties
idstring
nicknamestring
transfer_typeenum
1 = ACH2 = WIRE3 = RTP
account_holder_namestring
account_numberstring
bank_namestring
bank_routing_numberstring
statusenum
0 = STATUS_UNKNOWN1 = PENDING2 = ACTIVE3 = FAILED4 = INACTIVE
created_time_msstringint64
archived_time_msstringint64
GET/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}
curl -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());
200Successful
{
  "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"
  }
}

Money API›Money Service

GetFiatWithdrawals

GEThttps://api.pax.markets/v1/money/fiat-withdrawals

Response

A successful response.

withdrawalsobject[]
+ Show 13 properties
idstring
idempotency_keystring
bank_account_idstring
transfer_methodenum
1 = US_ACH2 = US_WIRE3 = US_RTP
currencystring
amountstringint64
fee_currencystring
feestringint64
memostring
statusenum
0 = QUEUED1 = PENDING4 = COMPLETED5 = FAILED6 = RETURNED
referencestring
created_time_msstringint64
updated_time_msstringint64
GET/v1/money/fiat-withdrawals
curl -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());
200Successful
{
  "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"
    }
  ]
}

Money API›Money Service

GetFiatWithdrawal

GEThttps://api.pax.markets/v1/money/fiat-withdrawals/{withdrawal_id}

Path Parameters

withdrawal_idstring

Response

A successful response.

withdrawalobject
+ Show 13 properties
idstring
idempotency_keystring
bank_account_idstring
transfer_methodenum
1 = US_ACH2 = US_WIRE3 = US_RTP
currencystring
amountstringint64
fee_currencystring
feestringint64
memostring
statusenum
0 = QUEUED1 = PENDING4 = COMPLETED5 = FAILED6 = RETURNED
referencestring
created_time_msstringint64
updated_time_msstringint64
GET/v1/money/fiat-withdrawals/{withdrawal_id}
curl -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());
200Successful
{
  "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"
  }
}

Money API›Money Service

GetFiatWithdrawalByIdempotencyKey

GEThttps://api.pax.markets/v1/money/fiat-withdrawals-by-idempotency-key/{idempotency_key}

Path Parameters

idempotency_keystring

Response

A successful response.

withdrawalobject
+ Show 13 properties
idstring
idempotency_keystring
bank_account_idstring
transfer_methodenum
1 = US_ACH2 = US_WIRE3 = US_RTP
currencystring
amountstringint64
fee_currencystring
feestringint64
memostring
statusenum
0 = QUEUED1 = PENDING4 = COMPLETED5 = FAILED6 = RETURNED
referencestring
created_time_msstringint64
updated_time_msstringint64
GET/v1/money/fiat-withdrawals-by-idempotency-key/{idempotency_key}
curl -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());
200Successful
{
  "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"
  }
}

Money API›Money Service

GetCryptoTransfers

GEThttps://api.pax.markets/v1/money/crypto-transfers

Response

A successful response.

transfersobject[]
+ Show 14 properties
idstring
typeenum
1 = DEPOSIT2 = WITHDRAWAL
chainstring
assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
amountstringint64
fee_tokenstring
feestringint64
sender_wallet_addressstring
receiver_wallet_addressstring
deposit_statusenum
1 = INITIATED2 = PENDING_ATTRIBUTION3 = PENDING_REVIEW4 = COMPLETED5 = BLOCKED6 = FAILED
withdrawal_statusenum
1 = QUEUED2 = IN_PROGRESS3 = PENDING_ON_CHAIN4 = COMPLETION_NOTIFIED5 = COMPLETED6 = FAILURE_NOTIFIED7 = FAILED
transaction_hashstring
created_time_msstringint64
updated_time_msstringint64
GET/v1/money/crypto-transfers
curl -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());
200Successful
{
  "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"
    }
  ]
}

Money API›Money Service

GetConversions

GEThttps://api.pax.markets/v1/money/conversions

Response

A successful response.

conversionsobject[]
+ Show 10 properties
idstring
statusenum
1 = PENDING2 = COMPLETED3 = FAILED
from_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
from_amountstringint64
to_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
to_amountstringint64
created_time_msstringint64
updated_time_msstringint64
fee_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
fee_amountstringint64
GET/v1/money/conversions
curl -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());
200Successful
{
  "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"
    }
  ]
}

Money API›Money Service

GetConversion

GEThttps://api.pax.markets/v1/money/conversions/{conversion_id}

Path Parameters

conversion_idstring

Response

A successful response.

conversionobject
+ Show 10 properties
idstring
statusenum
1 = PENDING2 = COMPLETED3 = FAILED
from_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
from_amountstringint64
to_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
to_amountstringint64
created_time_msstringint64
updated_time_msstringint64
fee_assetenum
1 = BTC2 = ETH3 = SOL4 = USDT5 = USDC6 = USD
fee_amountstringint64
GET/v1/money/conversions/{conversion_id}
curl -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());
200Successful
{
  "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"
  }
}

Money API›Money Service

ArchiveWithdrawWallet

DELETEhttps://api.pax.markets/v1/money/withdraw-wallets/{withdraw_wallet_id}

Path Parameters

withdraw_wallet_idstring

Response

A successful response.

DELETE/v1/money/withdraw-wallets/{withdraw_wallet_id}
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());

Money API›Money Service

ArchiveWithdrawBankAccount

DELETEhttps://api.pax.markets/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}

Path Parameters

withdraw_bank_account_idstring

Response

A successful response.

DELETE/v1/money/withdraw-bank-accounts/{withdraw_bank_account_id}
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());

Compatibility API›CompatibilityOrder Service

CancelOrder

POSThttps://api.pax.markets/v1/compatibility/order/cancel

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_idstring

Order whose unfilled quantity, side and price level set the cancel.

client_order_idstringOptional

Client-supplied id for the cancel, at most 36 bytes.

Response

A successful response.

order_idstring

Exchange-assigned id of the cancel order, not of the order named in the request.

POST/v1/compatibility/order/cancel
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());
200Successful
{
  "order_id": "string"
}

Compatibility API›CompatibilityOrder Service

BatchSubmitOrders

POSThttps://api.pax.markets/v1/compatibility/order/submit-batch

Place several orders in one request. Entries that fail validation or are rejected are skipped rather than failing the batch.

Request

ordersobject[]Optional

List of orders to place, in the order given. At most 10 per request.

+ Show 2 properties
orderobject

The order to place.

+ Show 6 properties
sideenum

Side to place on.

1 = ASK2 = BID
ASKSell the base asset.
BIDBuy the base asset.
market_idstringuint64

Market to place on.

qtystringint64

Quantity to place, a multiple of the market's step size. Must be positive except on a cancel lambda.

ticksintegerint32

Limit price in ticks, from 1 to the market's max_ticks.

tifenum

How long the order stays live.

1 = IOC2 = GTC
IOCFill what can be filled right away, cancel the rest. Never rests on the book.
GTCRest on the book until filled or canceled.
is_leverageboolean

Trade on margin. Currently disabled.

client_order_idstringOptional

Client-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.

POST/v1/compatibility/order/submit-batch
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());
200Successful
{
  "order_ids": []
}

Compatibility API›CompatibilityOrder Service

BatchCancelOrders

POSThttps://api.pax.markets/v1/compatibility/order/cancel-batch

Run several CancelOrder liquidity cancels in one request. Entries that cannot be canceled are skipped rather than failing the batch.

Request

ordersobject[]Optional

List of cancels to apply, in the order given. At most 10 per request.

+ Show 2 properties
order_idstring

Order whose unfilled quantity, side and price level set the cancel.

client_order_idstringOptional

Client-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.

POST/v1/compatibility/order/cancel-batch
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());
200Successful
{
  "order_ids": []
}

Regulated services provided by 1Money USA, Inc., a licensed money transmitter, NMLS ID 2628653 · Licenses