Unofficial. Community notes, not published by SmartX.
Place and manage prediction-market orders on SmartX from your own code.
SmartX runs the execution side for you. You send an intent (which outcome, which side, what price, how much) and the platform signs and submits it, so there is no wallet plumbing, no gas handling, and no key management in your client.
Everything here was verified against the live API on 2026-08-10, on two accounts, including the parts that behave oddly. Start with Authentication, then Orders.
| Place an order | limit or market, buy or sell, sized in USDC |
| Cancel an order | one at a time, and always verify. See Orders |
| List your orders | with fill state, average price, and failure reasons |
| List your positions | shares, entry, mark, realised and unrealised PnL |
| Inspect one market | your position in a single market |
| Read market data | prices and outcome ids for any listed market |
| Measure your balance | there is no endpoint, so examples/check-balance.mjs works it out. See Positions |
Node 18 or newer, no dependencies to install.
git clone https://github.com/bitgett/smartx-trading-api-docs
cd smartx-trading-api-docs
export SMARTX_TOKEN="jwt eyJ..." # see docs/authentication.md
node examples/list-positions.mjsIf that prints your positions, you are connected.
Three things to know before your first order, each of which has surprised someone already:
- The minimum order is 5 shares, so the minimum spend scales with price. At
a 2c limit that is $0.10; at 50c it is $2.50. Below it you get
60307 limit order shares must be >= 5. usdc_budgetsets your size,share_amountis ignored. Read the real size back off the order afterwards.200means accepted, not filled. Orders can fail later, asynchronously.
All three are in Orders, which is worth reading in full before you send anything with real size behind it.
https://api-grey.smartx.io
Two families live under it:
/service/poly_trade/…— your account: orders, positions/analytics/api/v1/…— market and wallet data, read only
{ "code": 200, "msg": "success", "data": { } }code is the one to branch on, not the HTTP status: a request can return
HTTP 200 with code set to an error.
200 under /service/… and 0 under /analytics/…. Both
say msg: "success". Accept both or half the API will look broken. See
Errors.
Read Orders. The one that has actually cost
money is treating 200 as a fill: the order can fail later, the client never
hears about it, and it keeps sizing the next order against money it no longer
has.
Maintained independently of SmartX. The API can change without this repo knowing, so if the docs and the API disagree, the API is right. Open an issue and it gets fixed.