Don't invest unless you're prepared to lose all the money you invest. This is a high-risk investment and you should not expect to be protected if something goes wrong. Take 2 mins to learn more.

DecryptrDevelopers
Paper trading

Change an account's fees, slippage and leverage cap

patch/v1/me/paper/accounts/{id}/costs

https://data.decryptr.ai/v1/me/paper/accounts/{id}/costs

  • API planFree, and every plan above it. Data is 60 minutes behind live on this plan.
  • Scopepaper:trade
  • Cost1 unit of quota. Also counts against the per-key write limit (60 a minute). How units are counted

Rate limits by plan

PlanUnits a monthPer secondPer minuteMost per request
Free1,00022010
Pay as you goAgreed1530050
EnterpriseAgreedAgreedAgreedAgreed

A 429 carries the full rate-limit header set and a Retry-After. Rate limits

Errors

  • 400The request was refused before any data was read. Nothing is charged.
  • 401No usable key. Nothing is charged.
  • 402The account cannot use the API until billing is sorted. Nothing is charged.
  • 403The key may not use this endpoint. Nothing is charged.
  • 404No such item. A lookup is still charged what it asked for.
  • 409The request was understood but refused, or repeated with a different body. Nothing was changed.
  • 429A limit was reached (calls or streams). Nothing was read and nothing is charged. Wait Retry-After seconds, back off with jitter, or ask for fewer items.
  • 500Something failed on our side. Nothing is charged. Retry with backoff.
  • 503The API is switched off, busy, or a query ran too long. Nothing is charged. Retry after Retry-After seconds.

Errors follow RFC 9457. Every error code

Changes the trading costs of one of your paper accounts. Send only what changes. New settings apply to fills from now on; fills already made keep what they paid, and open trades above a lowered leverage cap stay open. max_leverage: null removes the cap. Send an Idempotency-Key header to make a retry safe: repeating the same request with the same key within 24 hours returns the first answer (with Idempotent-Replayed: true) and changes nothing more.

Cost: 1 unit of quota. Also counts against the per-key write limit (60 a minute).

Needs scope paper:trade, which is off unless you switch it on for this key in the developer portal. Any plan.

Authorization

headerAuthorizationBearer <dcr_live_<8 hex>_<43 base64url> or dcr_test_...>

Your API key as a Bearer token: Authorization: Bearer dcr_live_....

Path Parameters

id*string

Paper account id.

Formatuuid

Header Parameters

Idempotency-Key?string

A unique string (1 to 64 letters, digits, dots, colons, dashes or underscores) that makes this write safe to retry. Repeating the same request with the same key within 24 hours returns the first answer, with the header Idempotent-Replayed: true, and changes nothing more. The same key with a different request is refused with 409 idempotency_conflict.

Match^[A-Za-z0-9_.:-]{1,64}$
Length1 <= length <= 64

Request Body

application/json
  1. body

Send only what changes.

Properties1 <= properties
fee_kind?string

How commission is charged: none, a percent of the order, an amount per unit, or an amount per order.

Value in"none""percent""per_unit""per_order"
fee_value?number

The commission: for percent, a percent of the order from 0 to 1; otherwise an amount in dollars.

Range0 <= value <= 1000
slippage_pct?number

How far a market fill moves against you, in percent.

Range0 <= value <= 5
max_leverage?|

The account's leverage cap, or null for none.

Range1 <= value <= 200
currency?|

A three-letter label for the account's currency, or null.

Match^[A-Za-z]{3}$

Response Body

OK.

application/json
  1. response
data*
as_of*string

When the response was made.

Formatdate-time
curl -X PATCH 'https://data.decryptr.ai/v1/me/paper/accounts/00000000-0000-4000-b000-000000000001/costs' \
  -H 'Idempotency-Key: order-2026-10-30-0001' \
  -H 'Content-Type: application/json' \
  -d '{
  "slippage_pct": 0.1
}'
Example Response
{  "data": {    "account": {      "id": "00000000-0000-4000-b000-000000000001",      "name": "Logged",      "is_paper": false,      "is_default": true,      "created_at": "2026-10-01T09:00:00.000000+00:00",      "start_balance": 10000,      "balance": 10000,      "realised_usd": 0,      "fees_usd": 0,      "margin_used": 200,      "available": 9800,      "open_sized": 1,      "pending_orders": 0,      "pending_margin": 0,      "balance_from": "2026-10-01T09:00:00.000000+00:00",      "costs": {        "fee_kind": "percent",        "fee_value": 0.05,        "slippage_pct": 0.1,        "max_leverage": null,        "currency": null      }    }  },  "as_of": "2026-10-30T12:00:30.000Z"}

Move the stop, targets or trailing stop PATCH

Changes the levels of an open trade or a resting order. Send only what changes. `stop: 0` removes the stop, `targets: []` removes the targets and their shares, `target_fractions: []` clears the shares and `trail_pct: 0` removes the trailing stop. Once a target has been hit the targets are locked; the stop can still move. Levels are judged from the price now (for a resting order, from its trigger price). The fill price is read by Decryptr from the venue at the moment of the request. You cannot send a price. Send an `Idempotency-Key` header to make a retry safe: repeating the same request with the same key within 24 hours returns the first answer (with `Idempotent-Replayed: true`) and changes nothing more. Cost: 1 unit of quota. Also counts against the per-key write limit (60 a minute). Needs scope `paper:trade`, which is off unless you switch it on for this key in the developer portal. Any plan.

Reset a paper account's balance POST

Starts the account's figures again from `balance` (the same as before when omitted). Trades stay in your history but stop counting towards the balance. Refused while the account has open sized trades or resting orders: close or cancel them first. Send an `Idempotency-Key` header to make a retry safe: repeating the same request with the same key within 24 hours returns the first answer (with `Idempotent-Replayed: true`) and changes nothing more. Cost: 1 unit of quota. Also counts against the per-key write limit (60 a minute). Needs scope `paper:trade`, which is off unless you switch it on for this key in the developer portal. Any plan.