A self-hosted digit trading app built on the Deriv WebSocket API. Supports Matches/Differs, Over/Under, and Even/Odd contract types with real-time tick streaming and digit frequency statistics.
- Node.js 18.18 or later
- Log in to your Deriv account and go to the API Token page to create a token with the required scopes.
- Navigate to App Registration and register a new application.
- Set the Redirect URI to the URL where you will host this app (e.g.
http://localhost:3000for local development). - Copy the App ID shown after registration — you will need it in the next step.
Copy .env.example to .env.production and fill in your values:
cp .env.example .env.productionEdit .env.production:
NEXT_PUBLIC_DERIV_APP_ID=your_app_id_here
NEXT_PUBLIC_DERIV_REDIRECT_URI=https://your-registered-redirect-uri.com
NEXT_PUBLIC_DERIV_APP_NAME=your_app_name_here
NEXT_PUBLIC_DERIV_REFERRAL_LINK=your_referral_link_here
NEXT_PUBLIC_DERIV_OAUTH_SCOPES=trade,account_manage
NEXT_PUBLIC_DERIV_ENV=production| Variable | Description |
|---|---|
NEXT_PUBLIC_DERIV_APP_ID |
Your Deriv app ID from the App Registration dashboard |
NEXT_PUBLIC_DERIV_REDIRECT_URI |
OAuth redirect URI — must exactly match the URI registered in your Deriv app |
NEXT_PUBLIC_DERIV_APP_NAME |
App name shown in the header |
NEXT_PUBLIC_DERIV_REFERRAL_LINK |
Affiliate referral link shown to unauthenticated users (optional) |
NEXT_PUBLIC_DERIV_OAUTH_SCOPES |
Comma-separated OAuth scopes (e.g. trade,account_manage) |
NEXT_PUBLIC_DERIV_ENV |
production to connect to the live Deriv endpoint; preview for staging |
For local development, copy .env.production to .env.local — Next.js will load .env.local automatically and it takes precedence over .env.production.
npm install
npm run devThe app is available at http://localhost:3000.
npm run buildThis produces a fully static export in the /out directory. Serve the contents of /out from any web server or static file host.
- Join Deriv → enlace de referido https://bit.ly/3Qc9tYi - trading.criptoinversiones.org → link al sitio oficial