EasyTrading API

API for automated PocketOption account registration

Base URL: https://tg-sitelive.com
All requests require an API key in the X-API-Key header.

Authentication

Every request must include the header:

X-API-Key: your-api-key

API keys are issued by the administrator. If the key is invalid or revoked, the API returns 401.

Register Account

POST /api/register

Start a new PocketOption account registration. Returns a task_id for tracking.

Request Body

FieldTypeDescription
emailstringrequiredEmail for registration
webhook_urlstringoptionalURL to receive result via POST

Example

curl -X POST https://tg-sitelive.com/api/register \
  -H "X-API-Key: your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "webhook_url": "https://your-server.com/webhook"
  }'

Response

{
  "task_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending",
  "message": "Registration started. Result will be sent to webhook."
}

Check Status

GET /api/status/{task_id}

Check registration task status by task_id.

Query parameters

ParamRequiredDescription
telegram_user_id when the task was created with one Caller's Telegram user id. If the task was registered on behalf of a Telegram user, the value must match or the server returns 403. The generated password is only included in the response for the verified owner — for everyone else it is null, even on completed.

Example

curl "https://tg-sitelive.com/api/status/550e8400-e29b-41d4-a716-446655440000?telegram_user_id=123456" \
  -H "X-API-Key: your-key"

Response (completed, caller is owner)

{
  "task_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "email": "[email protected]",
  "password": "xK9#mP2vLq&4Nw",
  "uid": 12345678,
  "error": null
}

Response (completed, caller is not owner / omitted)

{
  "task_id": "550e8400-...",
  "status": "completed",
  "email": "[email protected]",
  "password": null,
  "uid": 12345678,
  "error": null
}

Response (failed)

{
  "task_id": "550e8400-...",
  "status": "failed",
  "email": "[email protected]",
  "password": null,
  "uid": null,
  "error": "Error: email: This value is already used."
}

Statuses

StatusDescription
pendingTask created, waiting to start
processingRegistration in progress
completedAccount registered. The generated password is sent via webhook/bot; this endpoint only echoes it back to the verified Telegram owner.
failedRegistration failed, see error field

Get Auth Keys

GET /api/keys/{email}

Get WebSocket auth keys for a registered account. Used to connect to PocketOption trading API.

Example

curl https://tg-sitelive.com/api/keys/[email protected] \
  -H "X-API-Key: your-key"

Response

{
  "email": "[email protected]",
  "uid": 141820638,
  "auth_key_real": "42[\"auth\",{\"session\":\"a:4:{s:10:\\\"session_id\\\";s:32:\\\"abc...\\\";...}hash\",\"isDemo\":0,\"uid\":141820638,\"platform\":2,\"isFastHistory\":true,\"isOptimized\":true}]",
  "auth_key_demo": "42[\"auth\",{\"session\":\"ntp9jlmkq1rt4d78k6d5vcere0\",\"isDemo\":1,\"uid\":141820638,\"platform\":2,\"isFastHistory\":true,\"isOptimized\":true}]"
}
Note: auth_key_real uses the full CI session cookie (long PHP-serialized string). auth_key_demo uses a separate short session ID extracted from the demo cabinet page. Both are ready-to-use WebSocket auth frames — just send them to wss://api-{region}.po.market/socket.io/?EIO=4&transport=websocket.

Generate one-time autologin links that open a user directly into PocketOption deposit or withdrawal pages — no manual login needed. The same mechanism used by partner platforms.

How it works: The API logs into PocketOption using stored credentials (with reCAPTCHA), extracts the session token, and builds the deeplink URL. Each call takes ~15-25 seconds (captcha solving time). The token is valid until PocketOption expires the session (typically several hours).

Generated URL format

Deposit:
https://pocketoption.com/en/cabinet/deposit-step-1/?token=<32hex>&code=<ref_code>

Withdraw:
https://pocketoption.com/en/cabinet/withdrawal/?token=<32hex>
POST /api/deeplink/deposit

Generate a deposit deeplink for a registered account. Opens the PocketOption deposit page with user auto-logged-in.

Request Body

FieldTypeDescription
emailstringrequiredEmail of a previously registered account
codestringoptionalReferral/promo code (appended as &code=...)

Example

curl -X POST https://tg-sitelive.com/api/deeplink/deposit \
  -H "X-API-Key: your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "code": "ZCO294"
  }'

Response

{
  "email": "[email protected]",
  "url": "https://pocketoption.com/en/cabinet/deposit-step-1/?token=5059dbdb6622ea9e4f7854fc3ce677a3&code=ZCO294",
  "token": "5059dbdb6622ea9e4f7854fc3ce677a3",
  "type": "deposit"
}
POST /api/deeplink/withdraw

Generate a withdrawal deeplink. Opens the PocketOption withdrawal page with user auto-logged-in.

Request Body

FieldTypeDescription
emailstringrequiredEmail of a previously registered account

Example

curl -X POST https://tg-sitelive.com/api/deeplink/withdraw \
  -H "X-API-Key: your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]"
  }'

Response

{
  "email": "[email protected]",
  "url": "https://pocketoption.com/en/cabinet/withdrawal/?token=33bf3db93a89cab5af166c23827c3be5",
  "token": "33bf3db93a89cab5af166c23827c3be5",
  "type": "withdraw"
}
POST /api/deeplink/debug

Same as deposit, but returns full debug info — all steps, PO responses, cookies. For troubleshooting.

Integration Example (Python)

# Generate deposit link for your app's user
r = requests.post(f"{API}/api/deeplink/deposit", json={
    "email": "[email protected]",
    "code": "YOUR_REF_CODE"
}, headers=headers)

deposit_url = r.json()["url"]
# Send deposit_url to your user — they click it and land on PO deposit page, logged in

# Generate withdrawal link
r = requests.post(f"{API}/api/deeplink/withdraw", json={
    "email": "[email protected]"
}, headers=headers)

withdraw_url = r.json()["url"]
# Send withdraw_url to your user — they click it and land on PO withdrawal page
Token lifetime: Each token is a PocketOption session ID. It stays valid until PO expires the session. For reliable UX, generate a fresh link each time the user needs one — don't cache tokens for long periods.

Error 502: Returned when the login to PocketOption fails (wrong credentials, captcha issues, PO downtime). Check with /api/deeplink/debug for details.

Pool Status

GET /api/pool

Check the status of captcha and page pre-loading pools.

Response

{
  "v3_ready": 4,       // reCAPTCHA v3 tokens ready
  "v3_solving": 2,     // v3 tokens being solved
  "v2_ready": 1,       // reCAPTCHA v2 tokens ready
  "v2_solving": 1,     // v2 tokens being solved
  "page_ready": 3,     // pre-loaded registration pages
  "page_loading": 1    // pages being loaded
}
When pools are full, registrations complete in ~4 seconds. When pools are empty, it takes 15-30 seconds (captcha solving time).

Webhook

If webhook_url was provided during registration, the result is sent as a POST request with JSON body:

Success

{
  "task_id": "550e8400-...",
  "status": "completed",
  "email": "[email protected]",
  "password": "xK9#mP2vLq&4Nw",
  "uid": 12345678
}

Failure

{
  "task_id": "550e8400-...",
  "status": "failed",
  "email": "[email protected]",
  "error": "Error: email: This value is already used."
}

Error Codes

200Success 401Invalid or revoked API key 404Task or email not found 409Email already registered 422Invalid request body 502PocketOption login failed (deeplink endpoints)

All errors return JSON:

{
  "detail": "Error description"
}

Quick Start (Python)

import requests

API = "https://tg-sitelive.com"
KEY = "your-api-key"
headers = {"X-API-Key": KEY}

# Start registration
r = requests.post(f"{API}/api/register", json={
    "email": "[email protected]",
    "webhook_url": "https://your-server.com/hook"
}, headers=headers)
task_id = r.json()["task_id"]

# Check status (poll or wait for webhook)
import time
while True:
    r = requests.get(f"{API}/api/status/{task_id}", headers=headers)
    data = r.json()
    if data["status"] in ("completed", "failed"):
        print(data)
        break
    time.sleep(3)
EasyTrading API v2.0