Skip to main content
This guide walks one market trade end to end: market, quote, order, track. Every call is curl against production; swap in a scripx_test_… key to run the same thing in the sandbox. The same five calls work whichever side you trade. For the role-specific flows, see Sell scrips, Buy scrips, Run a desk, Net a group and Embed ScripX.

Before you begin

  1. An API key from ScripX (see Authentication). Export it: export SCRIPX_KEY=scripx_live_…
  2. The base URL: export BASE_URL=https://api.scripxhq.com
  3. Amounts ready in paise, prices read in bps of face. See Money and price.
Sandbox keys are unmetered and clearly marked. A test run is never mistaken for a live trade.
Trading on behalf of a client firm? Register and verify the firm first; its trades unlock when its connection state is connected.

Steps to your first trade

1

Read the market

A snapshot of the scheme: reference price and current depth. For a living view, use the SSE stream.
2

Take a firm quote

The response carries price_bps and all_in_paise, the one number your client gets: everything included, nothing bolted on after.
3

Place the order

Idempotency-Key makes the retry safe: re-sending the same key returns the original order instead of creating a second one. min_pct_bps is your price floor in bps of face.
4

Track it

Or list everything at once, wallet included, with GET /v1/positions.
5

Stop polling, get pushed

Keep the returned signing_secret, it is shown exactly once. Verify every delivery per the Webhooks guide.

Go-live checklist

Before swapping the scripx_test_ key for scripx_live_:
  1. Idempotency keys on every POST /v1/orders, one per logical order, retried fearlessly.
  2. Webhook signatures verified on the raw body, deliveries deduped on X-ScripX-Delivery, receiver returns 2xx fast.
  3. Retry-After honoured on 429; no fixed-interval hammering.
  4. Tolerant reader: unknown JSON fields and events ignored, enums treated as open sets.
  5. Keys server-side only, one child key per service, revocation path rehearsed.
  6. Money maths in integer paise end to end; no floats anywhere in the pipeline.
  7. Firm states handled: your UI routes verification_pending and reconnect_needed firms back to their connect link.

Need help?

Write to support

Include your key prefix (never the full key) and the response body of the failing call.