v1 · Live

Headless trading infrastructure
for builders.

One REST API. Binary & digit contracts. Bearer auth. Idempotent. Sub-second settlement on ticks. Bring your own broker app, keep 100% of your markup — VARJIX is the rails.

Sub-second tick settlement Idempotent on every call Bearer auth, SHA-256 hashed Cloudflare edge in front
Base URLhttps://api.varjix.com/v1All endpoints require HTTPS. Rate-limited per partner + per trader.

Quickstart

Four calls and you've placed your first trade through VARJIX. End-to-end in under a minute.

1

Get your API key

Become a VARJIX operator at partners.varjix.com and pick a tier (Launch / Pro / Scale). Then request your key — it's shown once: vk_live_…

bash
# Founder-issued (we'll provision this for you on plan activation):
curl https://api.varjix.com/v1/me \
  -H "Authorization: Bearer vk_live_xxxxxxxxxxxx_yyyyyyyyyy"
2

Forward a trader's Deriv tokens

Your app handles Deriv OAuth (using your own App ID). Once you have tokens, post them — VARJIX auto-provisions a trader and returns its canonical id. Use whichever id you already have on your side via traderExternalId.

bash
curl -X POST https://api.varjix.com/v1/auth/deriv/exchange \
  -H "Authorization: Bearer $VARJIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "traderExternalId": "user_abc123",
    "email": "[email protected]",
    "accounts": [
      {"accountId":"CR1234567","token":"a1-xxx","accountMode":"REAL","currency":"USD"},
      {"accountId":"VRTC9876543","token":"a1-yyy","accountMode":"DEMO","currency":"USD"}
    ]
  }'
3

Check balance (real-time from Deriv)

bash
curl "https://api.varjix.com/v1/balance?traderExternalId=user_abc123" \
  -H "Authorization: Bearer $VARJIX_API_KEY"
4

Place a digit trade — settles in <2s

bash
curl -X POST https://api.varjix.com/v1/orders/binary \
  -H "Authorization: Bearer $VARJIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "traderExternalId": "user_abc123",
    "clientOrderId":   "uuid-v4-here",
    "asset":           "R_100",
    "contractType":    "DIGITOVER",
    "stake":           1.00,
    "duration":        1,
    "durationUnit":    "t",
    "barrier":         "5"
  }'
json
{
  "orderId":         "ord_xyz",
  "brokerOrderId":   "299abc123",
  "status":          "CLOSED",
  "stake":           1.0,
  "potentialPayout": 1.95,
  "pnl":             0.95,
  "entryPrice":      1234.56,
  "exitPrice":       1234.78,
  "openedAt":        "2026-05-26T17:56:47Z",
  "closedAt":        "2026-05-26T17:56:48.500Z"
}

Why build on VARJIX

We run the broker, idempotency, settlement, ledger, and admin so you can focus on your traders' UX.

Sub-second tick settlement

Tick contracts (duration ≤ 10, unit 't') wait inline on the response — you get the closed P&L in the same request.

Idempotent end-to-end

Every order is keyed by your clientOrderId. Retry safely; we'll never double-fire on Deriv.

Bring your own Deriv app

Keep your markup at source. VARJIX never touches your trader funds — Deriv custodies, we orchestrate.

Admin & analytics free

Your traders + orders appear in adm.varjix.com tagged with your operator profile. No dashboards to build.

Multi-contract from day one

CALL/PUT + DIGITMATCH/DIFF/OVER/UNDER/EVEN/ODD live today. Multipliers + copy + AI co-pilot in v2.

Edge-cached at Cloudflare

Origin behind Cloudflare. p95 < 250ms anywhere in the world. HSTS + CSP + frame-deny enforced by nginx.

Authentication

Every request must include your API key in the Authorization header. Keys belong to one Partner (one operator account). Keep them server-side only — never ship a key to the browser.

http
Authorization: Bearer vk_live_<16hex>_<48hex>

Endpoint reference

All 9 v1 endpoints. Phase 2 (WebSockets, copy, AI) listed at the bottom.

POST/v1/orders/binary

Places a binary, call/put, or digit contract on Deriv via the trader's connection. Idempotent on clientOrderId — retry safely.

Body

json
{
  "traderExternalId": "user_abc123",
  "clientOrderId":    "uuid-v4-string",
  "asset":            "R_100",
  "contractType":     "DIGITOVER",
  "stake":            1.00,
  "duration":         1,
  "durationUnit":     "t",
  "barrier":          "5",
  "waitForSettle":    true
}

Field reference

traderExternalIdstringYour app-side stable user id
clientOrderIdstringUUID v4 — required for idempotency
assetstringDeriv symbol (R_100, frxEURUSD, …)
contractTypeenumCALL · PUT · DIGITMATCH/DIFF/OVER/UNDER/EVEN/ODD
stakenumberUSD, ≥ 0.35 (Deriv floor)
durationinteger≥ 1
durationUnitenumt · s · m · h · d
barrierstring?'0'..'9' — required for DIGITMATCH/DIFF/OVER/UNDER
waitForSettlebool?Force inline settle for non-tick contracts

200 — Tick (settled inline)

json
{
  "orderId":         "ord_xyz",
  "brokerOrderId":   "299abc123",
  "status":          "CLOSED",
  "stake":           1.0,
  "potentialPayout": 1.95,
  "buyPrice":        1.0,
  "pnl":             0.95,
  "entryPrice":      1234.56,
  "exitPrice":       1234.78,
  "openedAt":        "2026-05-26T17:56:47Z",
  "closedAt":        "2026-05-26T17:56:48.5Z"
}

200 — Long contract (still open)

json
{
  "orderId":         "ord_xyz",
  "brokerOrderId":   "299abc123",
  "status":          "OPEN",
  "stake":           1.0,
  "potentialPayout": 1.95,
  "buyPrice":        1.0,
  "openedAt":        "2026-05-26T17:56:47Z"
}

Poll GET /v1/orders until status="CLOSED", or wait for v2 webhooks.

POST/v1/auth/deriv/exchange

Stores a trader's Deriv tokens server-side (AES-256 encrypted at rest). Auto-provisions a VARJIX trader on first call. Subsequent calls for the same traderExternalId upsert.

json
// Request body
{
  "traderExternalId": "user_abc123",
  "email":            "[email protected]",
  "name":             "Jane Doe",
  "accounts": [
    {
      "accountId":   "CR1234567",
      "token":       "a1-xxxxxxxxxxxxxxx",
      "accountMode": "REAL",
      "currency":    "USD"
    }
  ]
}
json
// 200 OK
{
  "traderId":          "ckxyz...",
  "activeAccountId":   "CR1234567",
  "activeAccountMode": "REAL",
  "connectedAt":       "2026-05-26T17:56:47Z"
}
GET/v1/me
json
{
  "partnerId":   "ckabc...",
  "name":        "MK PRO",
  "plan":        "PRO",
  "saasStatus":  "ACTIVE",
  "tradersCount": 1247,
  "scopes":      ["trading:read", "trading:write", ...]
}
GET/v1/balance?traderExternalId=…
json
{
  "accountId":   "CR1234567",
  "accountMode": "REAL",
  "balance":     1247.83,
  "currency":    "USD"
}

Errors

Every error returns the same envelope:

json
{ "error": "INVALID_CONTRACT", "message": "Human-readable detail", "requestId": "req_abc" }
HTTPCodeCause
401UNAUTHENTICATEDMissing or malformed Bearer key
402SUBSCRIPTION_INACTIVEPartner's VARJIX plan is suspended
403KEY_REVOKEDKey was revoked — mint a new one
403PARTNER_SUSPENDEDOperator account suspended
404TRADER_NOT_FOUNDexternalId never sent through /auth/deriv/exchange
404BROKER_DISCONNECTEDNo Deriv tokens stored for this trader
422MARKET_CLOSEDIncludes secondsUntilOpen field
422INVALID_CONTRACTBad barrier / duration / asset combo
422INSUFFICIENT_BALANCEDeriv reports trader account empty
429RATE_LIMITEDPer-key or per-trader limit hit (Retry-After header)
502BROKER_UPSTREAMUnclassified Deriv error — retry; if persistent, escalate

Coming next

WebSocket stream

wss://api.varjix.com/v1/stream — live tick + order updates per trader, multiplexed over one socket.

HMAC webhooks

order.opened · order.closed · account.connected — signed with your secret, never miss a settlement.

Copy trading endpoints

Subscribe your traders to verified VARJIX leaders. /v1/copy/leaders/{id}/subscribe.

AI co-pilot signals

/v1/ai/copilot/signal — VARJIX's signal engine on demand. Pay-per-call or bundled with Pro+.

App-level reporting

/v1/app/revenue · /v1/app/traders — drop into your own analytics dashboard.

OpenAPI 3.1 + SDK

@varjix/sdk npm package, sandbox env, Mintlify interactive docs.

Ship your trading app on VARJIX.

Flat monthly fee. You keep 100% of your markup. Your traders see your brand — VARJIX is invisible.