Trading API
Trade Live, Practice or an active Prop account from a bot. Choose the account when creating a key. The key remains bound to that environment and account.
| Account | API origin | Funds |
|---|---|---|
| Live | https://api.novrinex.com |
Real funds in your authorized venue accounts |
| Practice | https://paper-api.novrinex.com |
Simulated pUSDC |
| Prop | https://paper-api.novrinex.com |
The selected evaluation stage or simulated funded account |
HTTP endpoints begin with /v1. SDK constructors accept the origin above, without /v1. The downloaded key file supplies the correct origin automatically. https://trading-api.testnet.novrinex.com remains a compatibility alias for the paper API. pUSDC has no monetary value.
Public market-data endpoints do not require a key. Account and order endpoints require a developer key and an Ed25519 signature.
Quick start
Section titled “Quick start”Open Settings > Developer API, select Live, Practice or a specific active Prop account, then create and download a key. Activate Practice or start your Prop stage first if it is missing from the account list. Choose the scopes your client needs. The private key is generated in your browser; store the downloaded file securely.
Install the Python client:
python -m pip install https://docs.novrinex.com/downloads/novrinex-1.1.0-py3-none-any.whlLoad the downloaded key file. The SDK generates order IDs when omitted.
import asyncio
from novrinex import NovrinexApiError, NovrinexClient
async def main(): async with NovrinexClient.from_key_file("novrinex-key.json") as client: positions = (await client.positions()).get("data", []) active = positions[0] if positions else None order = { "market_id": active["market_id"] if active else "BTC-PERP", "side": "sell" if active and active["side"] == "short" else "buy", "type": "market", "quantity": "0.001", "leverage": int(active["leverage"]) if active else 1, "margin_mode": active["margin_mode"] if active else "cross", "max_slippage_percent": "0.50", }
try: simulation = await client.simulate_order(order) if simulation["decision"] != "READY": print(simulation["issues"]) return
current = await client.place_order(order) for _ in range(30): if current["execution_stage"] == "TERMINAL": break await asyncio.sleep(1) current = await client.get_order(current["order_id"]) print(current["status"]) except NovrinexApiError as error: print(error)
asyncio.run(main())Practice and Prop orders use the selected website account and execute through novrinex-paper. Prop currently supports market entries only and applies the same evaluation rules to API and website orders. Live orders require the same venue authorization and funds as website trading.
For TypeScript on Node.js 20 or later:
npm install https://docs.novrinex.com/downloads/novrinex-trading-api-1.1.0.tgzThe key file contains the API URL, trading mode and account purpose. Simulated keys also contain the bound account ID. An account reset or new Prop stage requires a new key. Revoking a key stops new requests and access to private WebSocket updates.
The OpenAPI schema and interactive reference describe the HTTP contract.
Request rules
Section titled “Request rules”- Send prices, quantities, balances, and monetary values as decimal strings.
- Use RFC 3339 UTC timestamps.
- Raw HTTP clients must send unique
request_idandclient_order_idvalues. The SDK generates them when omitted. - Treat HTTP
202as accepted for processing, not filled. - Use the returned
order_idto read, amend, or cancel an order. - After a timeout, recover the original
request_idbefore submitting another order.
Main endpoints
Section titled “Main endpoints”| Task | Endpoint |
|---|---|
| Check availability | GET /v1/status |
| List markets | GET /v1/markets |
| Read an order book | GET /v1/markets/{market_id}/book |
| Read account totals | GET /v1/account |
| Read positions | GET /v1/positions |
| Simulate an order | POST /v1/orders/simulate |
| Place an order | POST /v1/orders |
| Read an order | GET /v1/orders/{order_id} |
| Cancel an order | POST /v1/orders/{order_id}/cancel |
| Recover a request | GET /v1/requests/{request_id} |
| Stream updates | GET /v1/ws |
Continue with authentication or the order examples.
Account capabilities
Section titled “Account capabilities”Call GET /v1/account/capabilities with your key to read its permissions, account purpose, market and route restrictions, and Prop leverage and entry-order restrictions. The Python SDK exposes account_capabilities(); TypeScript exposes accountCapabilities(). Market and venue limits also apply.