API
Connect your SigSig account to bots, trading journals and terminals with your own API keys.
The API lets your own programs and other tools read your account and place orders. They work with the same account and the same balance as the app. SigSig settles on Orderly Network, which is why the addresses and header names below contain orderly.
What a key can do
Section titled “What a key can do”| Permission | What it allows | Good for |
|---|---|---|
| Read | See balances, positions, orders and history | Trading journals, dashboards |
| Trading | Place, change and cancel orders | Bots, trading terminals |
The two are independent: Trading does not include Read. A bot that also checks its positions needs both.
Risk Controls work inside the app only. Orders placed through the API do not see your rules. Spot swaps run through your wallet and are not part of this API.
Create a key
Section titled “Create a key”-
Open Settings (gear icon in the top bar) → API Keys, or go there directly with Institutional → APIs. Your wallet needs a SigSig account with trading enabled.
-
Click Create API key and give the key a name, so you know later which tool it is for. The name is optional and cannot be changed afterwards.
-
Optionally enter the IP addresses allowed to use the key, separated by commas. Choose the permissions.
-
Click Create and confirm the signature in your wallet.
-
Copy the API key and the secret key. The secret key is shown only once and cannot be recovered.
A key is valid for 365 days; the list shows the date it expires. After that, create a new one. You can change the IP restriction or delete a key in the same place. A key belongs to the account that is active in the app, so a sub-account has its own keys.
A tool that connects to your account usually asks for three values:
| Value | Where to find it | Example |
|---|---|---|
| API key | Shown when you create the key and in the list | ed25519:8Hq3… |
| Secret key | Shown once when you create the key | ed25519:4kL9… |
| Account ID | SigSig UID at the top of API Keys | 0x4043…76ea |
Some tools also ask for a broker ID: it is sigsig. You only need it there, or when you create an account through the API instead of in the app.
Addresses
Section titled “Addresses”| REST | https://api.orderly.org |
| WebSocket, market data | wss://ws-evm.orderly.org/ws/stream/{account_id} |
| WebSocket, your account | wss://ws-private-evm.orderly.org/v2/ws/private/stream/{account_id} |
{account_id} is your SigSig UID. All amounts are in USDC.
Sign a request
Section titled “Sign a request”Market data under /v1/public/ needs no signature. Every other request carries four headers:
| Header | Value |
|---|---|
orderly-account-id |
Your SigSig UID |
orderly-key |
Your API key, including ed25519: |
orderly-timestamp |
The current time in milliseconds |
orderly-signature |
The signature of this request |
To sign, join four parts without spaces and sign the result with your secret key (Ed25519). Encode the signature as Base64url.
message = timestamp + METHOD + path + body- timestamp: the same value as in the header. Requests more than 300 seconds off are rejected, so keep your clock in sync.
- METHOD: in capital letters, for example
GETorPOST. - path: with its query, without the address, for example
/v1/order?symbol=PERP_ETH_USDC. - body: the exact JSON text you send. Empty for
GETandDELETE.
Send Content-Type: application/json with POST and PUT, and application/x-www-form-urlencoded with GET and DELETE.
The secret key is the part after ed25519:, in Base58. These two examples read your balance.
JavaScript (Node 18 or newer, npm install @scure/base):
import { createPrivateKey, sign } from "node:crypto";import { base58 } from "@scure/base";
const { SIGSIG_UID, SIGSIG_API_KEY, SIGSIG_SECRET } = process.env;
// Node reads an Ed25519 key in PKCS#8 form: a fixed prefix plus the 32 bytes of the secretconst privateKey = createPrivateKey({ key: Buffer.concat([ Buffer.from("302e020100300506032b657004220420", "hex"), base58.decode(SIGSIG_SECRET.replace("ed25519:", "")), ]), format: "der", type: "pkcs8",});
async function request(method, path, body) { const timestamp = Date.now(); const text = body ? JSON.stringify(body) : ""; const message = `${timestamp}${method}${path}${text}`; const response = await fetch(`https://api.orderly.org${path}`, { method, body: text || undefined, headers: { "Content-Type": body ? "application/json" : "application/x-www-form-urlencoded", "orderly-account-id": SIGSIG_UID, "orderly-key": SIGSIG_API_KEY, "orderly-timestamp": String(timestamp), "orderly-signature": sign(null, Buffer.from(message), privateKey).toString("base64url"), }, }); return response.json();}
console.log(await request("GET", "/v1/client/holding"));Python (pip install base58 cryptography requests):
import base64, json, os, timeimport base58, requestsfrom cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
UID = os.environ["SIGSIG_UID"]API_KEY = os.environ["SIGSIG_API_KEY"]SECRET = os.environ["SIGSIG_SECRET"].replace("ed25519:", "")private_key = Ed25519PrivateKey.from_private_bytes(base58.b58decode(SECRET))
def request(method, path, body=None): timestamp = int(time.time() * 1000) text = json.dumps(body, separators=(",", ":")) if body else "" signature = private_key.sign(f"{timestamp}{method}{path}{text}".encode()) return requests.request( method, f"https://api.orderly.org{path}", data=text or None, headers={ "Content-Type": "application/json" if body else "application/x-www-form-urlencoded", "orderly-account-id": UID, "orderly-key": API_KEY, "orderly-timestamp": str(timestamp), "orderly-signature": base64.urlsafe_b64encode(signature).decode().rstrip("="), }, ).json()
print(request("GET", "/v1/client/holding"))First calls
Section titled “First calls”| Request | What it does | Permission |
|---|---|---|
GET /v1/public/info |
Markets and their rules: price steps, smallest order | – |
GET /v1/client/holding |
Your balance | Read |
GET /v1/positions |
Your open positions | Read |
GET /v1/orders?status=INCOMPLETE |
Your open orders | Read |
POST /v1/order |
Place an order | Trading |
PUT /v1/order |
Change the price or size of an order | Trading |
DELETE /v1/order?order_id=…&symbol=… |
Cancel an order | Trading |
POST /v1/batch-order |
Place up to 10 orders at once | Trading |
Markets are named like PERP_BTC_USDC. Sizes are in the coin, prices in USDC. This places a limit order to buy 0.001 BTC at 60,000 USDC:
{ "symbol": "PERP_BTC_USDC", "order_type": "LIMIT", "side": "BUY", "order_price": 60000, "order_quantity": 0.001}order_type can be LIMIT, MARKET, IOC, FOK, POST_ONLY, ASK or BID. Set reduce_only to true for an order that may only make a position smaller. The answer only says the order was accepted: whether it filled comes through the WebSocket.
Live data
Section titled “Live data”Use the WebSocket instead of asking for the same data again and again. After connecting, subscribe with a message like this; the id is your own label:
{ "id": "book-1", "event": "subscribe", "topic": "PERP_BTC_USDC@orderbook" }Market data topics include {symbol}@orderbook, {symbol}@trade, {symbol}@ticker and {symbol}@kline_1m.
Your own data needs one extra step: log in right after connecting to the second address. Here the signed message is only the timestamp.
{ "id": "login", "event": "auth", "params": { "orderly_key": "ed25519:YOUR_API_KEY", "sign": "SIGNATURE_OF_THE_TIMESTAMP", "timestamp": 1793837744904 }}Then subscribe to executionreport (fills and cancellations), position or balance. These only send changes, so read the starting state once through REST. Send {"event":"ping"} every 20 to 30 seconds and reconnect when the connection drops.
Limits
Section titled “Limits”| Request | Limit |
|---|---|
| Place, change or cancel one order | 10 per second |
POST /v1/batch-order |
1 per second |
GET /v1/positions |
30 per 10 seconds |
| Public market data | about 10 per second, per IP address |
| All requests together | 600 per 5 minutes, per IP address |
A main account and its sub-accounts share their limits. Above a limit you get HTTP 429 with code -1003: wait, ask less often, or move to the WebSocket.
Common errors
Section titled “Common errors”| Error | Likely reason | What to do |
|---|---|---|
-1002 |
A header is missing | Send all four headers |
-1003 |
Too many requests | See Limits |
-1004 |
The key is wrong or expired | Check the key, or create a new one |
-1000 |
Wrong Content-Type |
See Sign a request |
HTTP 401 |
Key not known for this account | Check the SigSig UID and the key |
HTTP 403 with a web page |
The network blocks your IP address | Common with VPNs and some hosting providers: try another IP address |
Full reference
Section titled “Full reference”This page covers what most tools need. Every endpoint with all its fields is listed in the full API reference, which applies to SigSig accounts unchanged.