> For the complete documentation index, see [llms.txt](https://vnx.gitbook.io/vnx-global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vnx.gitbook.io/vnx-global/developer/api/trading.md).

# Trading

*Place Fill-or-Kill limit orders, then poll order and trade history for results — there are no webhooks.*

## Before you begin

* A signed-request setup. See Authentication.
* Discover tradable symbols via the public `/client/tradingPairs` endpoint.
* Trading is **limit orders only**, and every order is **Fill-or-Kill (FOK)** — it fills completely or not at all.
* All endpoints are `POST` with `application/x-www-form-urlencoded` bodies.

## Endpoints

| Method | Path                   | Purpose                   |
| ------ | ---------------------- | ------------------------- |
| POST   | `/private/addOrder`    | Place a FOK limit order   |
| POST   | `/private/queryOrders` | Order history with status |
| POST   | `/private/queryTrades` | Trade history with status |

## Place an order

Body: `timestamp`, `clordid` (your client order id), `symbol`, `side` (`Buy`/`Sell`), `ordtype` (`Limit`), `timeinforce` (`FOK`), `orderqty`, `price`.

```http
POST /api/v1/private/addOrder HTTP/1.1Host: api.vnx.ioContent-Type: application/x-www-form-urlencodedUser-Agent: MyClient/1.0x-app-public-key: <public_key>x-app-nonce: 1708881600001x-app-signed-data: <base64url_signature>timestamp=2024-02-25T12%3A00%3A00Z&clordid=order123&symbol=VCHF%2FCHF&side=Buy&ordtype=Limit&timeinforce=FOK&orderqty=100&price=0.95
```

```json
{  "timestamp": "2026-06-19T09:21:33Z",  "result": "ok",  "order": {    "clordid": "order123",    "ordid": "ord_01HV...",    "ordstatus": "Filled",    "bought": "100",    "bought_currency": "VCHF",    "sold": "95",    "sold_currency": "CHF",    "fee": "0.00",    "fee_currency": "CHF"  },  "error": { "code": null, "message": null }}
```

Because orders are FOK, `ordstatus` resolves immediately. A rejected order returns details in the `error` object inside the response body, so always inspect it even on a `200`.

## Poll history

There are no webhooks. Use `/private/queryOrders` and `/private/queryTrades` to retrieve order and trade history with status, matching on your `clordid` or the returned `ordid`.

## Verify

`addOrder` returns `200` with an `order` object. Confirm fills by polling `/private/queryTrades`.

## Common errors

| `code` / `status`    | Meaning                            | Fix                                    |
| -------------------- | ---------------------------------- | -------------------------------------- |
| `400` unknown symbol | Symbol not tradable                | Check `/client/tradingPairs`           |
| `400` invalid order  | Bad `side`/`ordtype`/`timeinforce` | Use `Limit` + `FOK`                    |
| order `error`        | FOK could not fully fill           | Re-quote and retry at a fillable price |
| `429` rate limited   | Over 1 req/sec per key             | Backoff                                |

## Next steps

* Quotes and payment rails
* Balances

## Related

* [API Overview](/vnx-global/developer/api/overview.md)
* [Authentication](/vnx-global/developer/concepts/authentication.md)
* [Glossary](/vnx-global/glossary.md)
