Skip to main content

Prerequisites

  1. A DojiFunded account with an active plan.
  2. An API key with TRADE and READ_ONLY permissions - create one at Dashboard → Settings → Developer.
  3. Your account_id from the dashboard.

Set environment variables


The bot


What just happened

  1. Account summary - reads live equity and margin state before acting.
  2. Limit order - a post_only limit buy that will only rest on the book, never take liquidity.
  3. client_id - a timestamp-based ID that makes the request idempotent. Safe to retry on failure.
  4. Violation check - always inspect violations before assuming success.

Next steps

Orders

Explore all order types: stop, take-profit, reduce-only, and cross-venue.

Accounts

Pull positions, trade history, breaches, and analytics.

Webhooks

Replace polling with real-time push events for fills and position closes.

Errors

Handle risk violations, retries, and rate limits correctly.