Funding & ledger
Move money in and out of a client account from your CRM, payment processor, or back-office. Every operation is recorded in the account's transactions ledger.
Operations
POST /api/v1/accounts/{account_id}/money/deposit
POST /api/v1/accounts/{account_id}/money/withdrawal
POST /api/v1/accounts/{account_id}/money/adjust
POST /api/v1/accounts/{account_id}/money/credit-in
POST /api/v1/accounts/{account_id}/money/credit-out
| Operation | Effect |
|---|---|
deposit / withdrawal | add / remove real balance |
adjust | correcting entry (e.g. reconciliation) |
credit-in / credit-out | bonus / non-withdrawable credit |
All five take the same body: { "amount": number, "desc": string }.
- curl
- Node.js
- Python
curl --request POST \
--url https://api.onlytradeplatform.com/api/v1/accounts/26100005/money/deposit \
--header "Authorization: Bearer $ADMIN_TOKEN" \
--header "Content-Type: application/json" \
--data '{ "amount": 100000, "desc": "Funded challenge payout" }'
await fetch(
"https://api.onlytradeplatform.com/api/v1/accounts/26100005/money/deposit",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ADMIN_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ amount: 100000, desc: "Funded challenge payout" }),
},
);
import os, requests
requests.post(
"https://api.onlytradeplatform.com/api/v1/accounts/26100005/money/deposit",
headers={"Authorization": f"Bearer {os.environ['ADMIN_TOKEN']}"},
json={"amount": 100000, "desc": "Funded challenge payout"},
)
The response is the updated account. A deposit/withdrawal also emits a
money_change event on the WebSocket stream, so a
connected terminal updates its balance live.
Transactions ledger
Read an account's money history:
GET /api/v1/accounts/me/transactions?origin=0,2,3,6,7
The origin filter selects which entry types to include:
origin | Type |
|---|---|
0 | deposit |
2 | adjust |
3 | withdrawal |
6 | credit-in |
7 | credit-out |
Omit it to get the full balance history. Each row carries amount, type
(0 credit / 1 debit), desc, status, and timestamps.
Funding a trade_type: 1 account moves only virtual balance. Practice your
deposit/withdrawal integration there before going live — see
Environments & testing.