polo-spot
Polo Spot Skill
Spot trading on Poloniex using authenticated and public API endpoints. Return the result in JSON format.
Base URLs
- Public:
https://api.poloniex.com - Private:
https://api.poloniex.com
Quick Reference
Complete API endpoints for Polo Spot. All endpoints are relative to the base URLs above.
Reference Data (Public)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
GET /markets |
Get all symbols and trade limit info | None | symbol | No |
GET /currencies |
Get all supported currencies | None | currency, includeMultiChainCurrencies | No |
GET /v2/currencies |
Get all supported currencies (V2) | None | currency | No |
GET /timestamp |
Get current server time | None | None | No |
Market Data (Public)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
GET /markets/price |
Get latest trade price for all symbols | None | symbol | No |
GET /markets/markPrice |
Get latest mark price for all cross margin symbols | None | symbol | No |
GET /markets/{symbol}/markPriceComponents |
Get mark price components for a symbol | symbol (path) | None | No |
GET /markets/{symbol}/orderBook |
Get order book for a symbol | symbol (path) | scale, limit | No |
GET /markets/{symbol}/candles |
Get OHLC candle data | symbol (path), interval | limit, startTime, endTime | No |
GET /markets/{symbol}/trades |
Get recent trades for a symbol | symbol (path) | limit | No |
GET /markets/ticker24h |
Get 24h ticker for all symbols | None | symbol | No |
Margin (Public)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
GET /markets/collateralInfo |
Get collateral information for all currencies | None | currency | No |
GET /markets/borrowRatesInfo |
Get borrow rates for all tiers and currencies | None | None | No |
Account (Private)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
GET /accounts |
Get list of all accounts | None | None | Yes |
GET /accounts/balances |
Get all accounts with balances | None | id | Yes |
GET /accounts/activity |
Get account activity (airdrops, rebates, staking) | None | startTime, endTime, activityType, limit, from, direction, currency | Yes |
POST /accounts/transfer |
Transfer between accounts | currency(only support USDT), amount, fromAccount, toAccount | None | Yes |
GET /accounts/transfer |
Get transfer records | None | id | Yes |
GET /feeinfo |
Get fee rate for the account | None | None | Yes |
GET /accounts/interest/history |
Get interest collection records | None | limit, from, direction, startTime, endTime | Yes |
Subaccount (Private)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
GET /subaccounts |
Get all accounts within an Account Group | None | None | Yes |
GET /subaccounts/balances |
Get balances for all subaccounts | id | None | Yes |
POST /subaccounts/transfer |
Transfer between accounts in Account Group | currency, amount, fromAccountId, fromAccountType, toAccountId, toAccountType | None | Yes |
GET /subaccounts/transfer |
Get subaccount transfer records | None | id | Yes |
Wallet (Private)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
GET /wallets/addresses |
Get all deposit addresses | None | currency | Yes |
GET /wallets/activity |
Get deposit and withdrawal history | start, end | activityType | Yes |
POST /wallets/address |
Create a new deposit address for a currency | currency | None | Yes |
POST /wallets/withdraw |
Withdraw currency | currency, amount, address | paymentId, allowBorrow | Yes |
POST /v2/wallets/withdraw |
Withdraw currency (V2) | coin, network, amount, address | addressTag, allowBorrow | Yes |
Margin (Private)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
GET /margin/accountMargin |
Get account margin information | accountType | None | Yes |
GET /margin/borrowStatus |
Get borrow status of currencies | None | currency | Yes |
GET /margin/maxSize |
Get maximum buy/sell amount for a symbol | symbol | None | Yes |
Orders (Private)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
POST /orders |
Create an order | symbol, side | timeInForce, type, accountType, price, quantity, amount, clientOrderId, allowBorrow, stpMode, slippageTolerance | Yes |
POST /orders/batch |
Create multiple orders (max 20) | Array of order objects | None | Yes |
PUT /orders/{id} |
Cancel and replace an order | id (path) | clientOrderId, price, quantity, amount, type, timeInForce, allowBorrow, proceedOnFailure, slippageTolerance | Yes |
GET /orders |
Get list of active orders | None | symbol, side, from, direction, limit | Yes |
GET /orders/{id} |
Get order status by id | id (path) | None | Yes |
DELETE /orders/{id} |
Cancel an active order | id (path) | None | Yes |
DELETE /orders/cancelByIds |
Cancel multiple orders by IDs | orderIds or clientOrderIds | None | Yes |
DELETE /orders |
Cancel all orders | None | symbols, accountTypes | Yes |
POST /orders/killSwitch |
Set kill switch timer to cancel all orders | timeout | None | Yes |
GET /orders/killSwitchStatus |
Get kill switch status | None | None | Yes |
Smart Orders (Private)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
POST /smartorders |
Create a smart order | symbol, side, quantity | timeInForce, type, accountType, price, stopPrice, amount, clientOrderId, trailingOffset, limitOffset, operator | Yes |
PUT /smartorders/{id} |
Cancel and replace a smart order | id (path) | clientOrderId, price, stopPrice, quantity, amount, type, timeInForce, proceedOnFailure | Yes |
GET /smartorders |
Get list of pending smart orders | None | limit, types | Yes |
GET /smartorders/{id} |
Get smart order status | id (path) | None | Yes |
DELETE /smartorders/{id} |
Cancel a smart order | id (path) | None | Yes |
DELETE /smartorders/cancelByIds |
Cancel multiple smart orders by IDs | orderIds or clientOrderIds | None | Yes |
DELETE /smartorders |
Cancel all smart orders | None | symbols, accountTypes, orderTypes | Yes |
Order History (Private)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
GET /orders/history |
Get historical orders (max 30 days) | None | accountType, type, side, symbol, from, direction, states, limit, hideCancel, startTime, endTime | Yes |
GET /smartorders/history |
Get historical smart orders (max 30 days) | None | accountType, type, side, symbol, from, direction, states, limit, hideCancel, startTime, endTime, types | Yes |
Trade History (Private)
| Endpoint | Description | Required | Optional | Authentication |
|---|---|---|---|---|
GET /trades |
Get all trades for account (max 180 days) | None | limit, endTime, startTime, from, direction, symbols | Yes |
GET /orders/{id}/trades |
Get all trades for a specific order | id (path) | None | Yes |
Parameters
Common Parameters
Symbol & Market
- symbol: Trading pair symbol (e.g., BTC_USDT, ETH_USDT)
- currency: Currency name (e.g., USDT, BTC, ETH)
- interval: Candle interval — MINUTE_1, MINUTE_5, MINUTE_10, MINUTE_15, MINUTE_30, HOUR_1, HOUR_2, HOUR_4, HOUR_6, HOUR_12, DAY_1, DAY_3, WEEK_1, MONTH_1
- scale: Price aggregation scale for order book
- accountType: Account type — SPOT (primary supported)
Order Parameters
- side: Order side — BUY, SELL
- type: Order type — MARKET, LIMIT, LIMIT_MAKER
- timeInForce: Time in force — GTC (default), IOC, FOK
- price: Order price — required for LIMIT and LIMIT_MAKER orders
- quantity: Base currency quantity — required for MARKET SELL or LIMIT orders
- amount: Quote currency amount — required for MARKET BUY
- clientOrderId: Client-defined order ID (max 64 characters)
- allowBorrow: Allow borrow for margin orders (default false)
- stpMode: Self-trade prevention — None, EXPIRE_TAKER (default)
- slippageTolerance: Slippage tolerance for MARKET orders (range: >0 and <1)
Smart Order Parameters
- stopPrice: Trigger price for STOP/STOP_LIMIT; activation price for TRAILING types
- trailingOffset: Required for TRAILING types; suffix with % for proportion
- limitOffset: Required for TRAILING_STOP_LIMIT
- operator: GTE or LTE — used with TRAILING types
- proceedOnFailure: Continue with new order even if cancel fails (default false)
Pagination Parameters
- from: ID to begin query (default 0)
- direction: Query direction — PRE (previous), NEXT (default)
- limit: Number of records to return
- startTime: Start time (Unix milliseconds)
- endTime: End time (Unix milliseconds)
Transfer Parameters
- fromAccount: Source account identifier
- toAccount: Destination account identifier
- fromAccountId: External UID of source account (subaccount transfers)
- toAccountId: External UID of destination account (subaccount transfers)
- fromAccountType: Source account type — SPOT or FUTURES
- toAccountType: Destination account type — SPOT or FUTURES
Wallet Parameters
- address: Withdrawal destination address
- paymentId: Memo/tag for command deposit addresses (V1 withdraw)
- coin: Currency name for V2 withdrawal (e.g., BTC, USDT, USDD)
- network: Target blockchain network for V2 withdrawal (e.g., BTC, ETH, TRX)
- addressTag: Memo for V2 withdrawal command deposit addresses
Enums
Order Side
- side: BUY, SELL
Order Type
- type: MARKET, LIMIT, LIMIT_MAKER
Smart Order Type
- type: STOP, STOP_LIMIT, TRAILING_STOP, TRAILING_STOP_LIMIT
Time in Force
- timeInForce: GTC (Good Till Cancel, default), IOC (Immediate or Cancel), FOK (Fill or Kill)
Order State
- state: NEW, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, PARTIALLY_CANCELED, CANCELED, FAILED
Smart Order State
- state: PENDING_NEW, PENDING_CANCEL, CANCELED, TRIGGERED, FAILED
Symbol State
- state: NORMAL, PAUSE, POST_ONLY
Account Type
- accountType: SPOT, FUTURES
Query Direction
- direction: PRE, NEXT
Activity Type
- activityType: 200 (ALL), 201 (AIRDROP), 202 (COMMISSION_REBATE), 203 (STAKING), 204 (REFERAL_REBATE), 205 (SWAP), 104 (CREDIT_ADJUSTMENT), 105 (DEBIT_ADJUSTMENT), 199 (OTHER)
Trade Match Role
- matchRole: MAKER, TAKER
Authentication
For private endpoints, you will need to provide Polo API credentials.
Required credentials:
- apiKey: Your Polo API key
- secretKey: Your Polo API secret (for signing)
See references/authentication.md for the full signing process.
Security
Share Credentials
Users can provide Polo API credentials by sending a file where the content is in the following format:
api_key_here
secret_key_here
Never Display Full Secrets
When showing credentials to users:
- API Key: Show first 5 + last 4 characters:
abcde...xyz1 - Secret Key: Always mask, show only last 5:
***...key12
Example response when asked for credentials:
Account: main
API Key: abcde...xyz1
Secret: ***...key12
Environment: Production
Listing Accounts
When listing accounts, show names and environment only — never keys:
Polo Accounts:
* main (Production)
* trading (Production)
Transactions in Production
When performing transactions in production, always confirm with the user before proceeding by asking them to write "CONFIRM" to proceed.
Polo Accounts
main
- API Key: your_api_key
- Secret: your_secret_key
- Environment: https://api.poloniex.com
- Description: Primary spot trading account
TOOLS.md Structure
## Polo Accounts
### main
- API Key: abcde...xyz1
- Secret: secret_abc...key
- Environment: https://api.poloniex.com
- Description: Primary spot trading account
Agent Behavior
- Credentials requested: Mask secrets (show last 5 chars only)
- Listing accounts: Show names and environment, never keys
- Account selection: Ask if ambiguous, default to main
- When doing a transaction in production, confirm with user before by asking to write "CONFIRM" to proceed
- New credentials: Prompt for name, environment
Adding New Accounts
When user provides new credentials:
- Ask for account name
- Ask: Which environment (Production)
- Store in
TOOLS.mdwith masked display confirmation
User Agent Header
Include User-Agent header with the following string: polo-spot/1.0.0 (Skill)
Important Notes
- All timestamps are in Unix milliseconds unless specified otherwise
- Symbol format uses underscore separator (e.g., BTC_USDT, not BTC-USDT)
- For order IDs: if using clientOrderId, prefix with
cid:(e.g.,cid:my-order-1) - Order quantity is in base currency units; amount is in quote currency units
- MARKET BUY requires
amount(quote units); MARKET SELL requiresquantity(base units) - LIMIT and LIMIT_MAKER orders require both
priceandquantity - Kill switch timeout range: -1 (disable) or 10–600 seconds
- Batch order creation supports up to 20 orders per request
- Order history max interval: 30 days; trade history max interval: 180 days
- Canceled orders archived after 7 days; other orders after 90 days
- Self-trading not allowed — incoming orders causing self-trade are canceled
- Orders causing >20% price movement are rejected
- Subaccount transfers: primary can transfer between any accounts; subaccounts can only transfer to primary
- Transfer records max interval: 6 months (default last 7 days)
- Interest history max interval: 90 days (default last 7 days)
- All DELETE requests that do not require parameters must include a request body of
{}(empty JSON object) — usejson={}in the request - All request endpoints must match the endpoints specified in the documentation.