v2.0 · Developer reference

The TM9 API.

A REST surface for managing accounts, transactions, positions, funds and groups on the TM9 platform. All endpoints are POST and accept JSON.

POST
Base URL
https://<your-tm9-host>/
Auth
supervisor_id + supervisor_pwd
Format
application/json
i

Get account details

POST /getAccount

Retrieve account information for a specific user — balance, equity, leverage, status, and other profile details.

{
  "user_id": "<Account No>",
  "pwd": "",
  "supervisor_id": "900003",
  "supervisor_pwd": "<your password>",
  "supervisor_type": "ADMIN"
}
NameTypeDescriptionRequired
user_idstringThe account number of the user.Yes
pwdstringLeave empty.Yes
supervisor_idstringID of the supervising ADMIN.Yes
supervisor_pwdstringPassword of the supervising ADMIN.Yes
supervisor_typestringType of supervisor (e.g. ADMIN).Yes
Returns the user's account profile — balance, equity, leverage, KYC status, and an overall status flag indicating success or failure.
ii

Get transactions

POST /getTransactions

Retrieve all deposit and withdrawal transactions for a user within a given date range, or filter to a specific transaction ID.

{
  "from_dt": "YYYY-MM-DD HH:MM:SS",
  "to_dt": "YYYY-MM-DD HH:MM:SS",
  "user_id": "<Account No>",
  "trans_id": "",
  "comment": "test",
  "supervisor_id": "900003",
  "supervisor_pwd": "<your password>",
  "supervisor_type": "ADMIN"
}
NameTypeDescriptionRequired
from_dtstringStart of search range (YYYY-MM-DD HH:MM:SS).Yes
to_dtstringEnd of search range (YYYY-MM-DD HH:MM:SS).Yes
user_idstringAccount number of the user.Yes
trans_idstringSpecific transaction ID; leave empty to return all in range.Yes
commentstringFree-form comment for the request.Yes
supervisor_idstringID of the supervising ADMIN.Yes
supervisor_pwdstringPassword of the supervising ADMIN.Yes
supervisor_typestringType of supervisor (e.g. ADMIN).Yes
Returns an array of transaction objects — each with trans_id, type (deposit / withdrawal), amount, datetime, and status.
iii

Get open positions

POST /getPositions

Retrieve all open trading positions for a user, with optional filters by side, symbol, position ID, volume, and group.

{
  "from_dt": "YYYY-MM-DD HH:MM:SS",
  "to_dt": "YYYY-MM-DD HH:MM:SS",
  "user_id": "<Account No>",
  "volume": 0.0,
  "side": "BUY | SELL | (empty for both)",
  "position_id": "",
  "symbol": "",
  "supervisor_id": "900003",
  "supervisor_pwd": "<your password>",
  "supervisor_type": "ADMIN",
  "group_id": ""
}
NameTypeDescriptionRequired
from_dtstringStart of search range.Yes
to_dtstringEnd of search range.Yes
user_idstringAccount number of the user.Yes
volumenumberFilter by volume; 0.0 returns all.Yes
sidestringBUY, SELL, or empty for both.Yes
position_idstringSpecific position ID; empty for all.Yes
symbolstringSpecific instrument; empty for all.Yes
supervisor_idstringID of the supervising ADMIN.Yes
supervisor_pwdstringPassword of the supervising ADMIN.Yes
supervisor_typestringType of supervisor (e.g. ADMIN).Yes
group_idstringFilter by group; empty for all.Yes
Returns an array of open-position objects — position_id, symbol, side, volume, open price, current price, and floating P&L.
iv

Create account

POST /account

Create a new user account on the platform. Returns the assigned account number plus the full profile.

{
  "ADMIN_id": "900001",
  "group_id": "1000002",
  "api_pwd": "A%123456a",
  "pwd": "A%123456a",
  "investor_pwd": "investor@123",
  "balance": "0",
  "blocked": "0",
  "enableTrading": "1",
  "enableAlgoTrading": "1",
  "showRegularADMIN": 0,
  "includeServerReports": "0",
  "enableDailyReports": "1",
  "enableApiConnections": "1",
  "limitTotalValue": "0",
  "limitTotalOrders": "1000",
  "language": "en",
  "acct_mode": "1",
  "first_name": "Aman",
  "last_name": "Kumar",
  "type": "USER",
  "status": "Incomplete",
  "kyc_status": "Not Approved",
  "group": "RawSpread",
  "country": "India",
  "currency": "USD",
  "email": "[email protected]",
  "leverage": "500",
  "supervisor_id": "900003",
  "supervisor_pwd": "<your password>",
  "supervisor_type": "ADMIN"
}
NameTypeDescriptionRequired
ADMIN_idstringADMIN ID for the account.Yes
group_idstringGroup the account belongs to.Yes
api_pwdstringAPI password.Yes
pwdstringMain account password.Yes
investor_pwdstringInvestor (read-only) password.Yes
balancestringInitial balance.Yes
blockedstring0 = active, 1 = blocked.Yes
enableTradingstringEnable trading (1/0).Yes
enableAlgoTradingstringEnable algo trading.Yes
enableApiConnectionsstringAllow API connections.Yes
limitTotalOrdersstringMax concurrent open orders.Yes
languagestringUI language (e.g. en).Yes
acct_modestring1 = real, 0 = demo.Yes
first_namestringFirst name.Yes
last_namestringLast name.Yes
typestringUser type (e.g. USER).Yes
statusstringAccount status.Yes
kyc_statusstringKYC status.Yes
groupstringGroup name (e.g. RawSpread).Yes
countrystringCountry.Yes
currencystringAccount currency.Yes
emailstringUser email.Yes
leveragestringAccount leverage (e.g. 500).Yes
address, city, state, zip_code, phone, company, middle_name, commentstringProfile fields.Optional
supervisor_id, supervisor_pwd, supervisor_typestringAuth credentials for the call.Yes
Returns the newly created account, including the auto-generated account number, plus a status flag.
v

Deposit or withdraw funds

POST /deposit /withdraw

Two endpoints with an identical body — /deposit credits funds, /withdraw debits them.

{
  "uid": "<Account No>",
  "fund_amount": "<amount>",
  "dt": "YYYY-MM-DD HH:MM:SS",
  "group": "",
  "name": "",
  "supervisor_id": "900003",
  "supervisor_pwd": "<your password>",
  "supervisor_type": "ADMIN",
  "fund_type": "BALANCE"
}
NameTypeDescriptionRequired
uidstringAccount number of the user.Yes
fund_amountstringAmount to deposit or withdraw.Yes
dtstringDatetime of the transaction.Yes
groupstringReserved.Optional
namestringReserved.Optional
supervisor_idstringID of the supervising ADMIN.Yes
supervisor_pwdstringPassword of the supervising ADMIN.Yes
supervisor_typestringType of supervisor.Yes
fund_typestringType of fund (e.g. BALANCE).Yes
Confirms the transaction, returns the resulting account balance, and a status flag.
vi

Create a group

POST /createGroup

Create a new trading group with custom leverage, margin policy, allowed symbols, and risk-management rules.

{
  "gname": "<GROUP NAME>",
  "server": "COMPANY NAME",
  "gtype": "2",
  "auth": "1",
  "otp": "0",
  "currency": "USD",
  "digits": 2,
  "leverage": 500,
  "margin_call_level": 90,
  "stop_out_level": 10,
  "max_orders": 0,
  "max_symbols": 100,
  "max_positions": 500,
  "min_password_length": 8,
  "available_history": 1,
  "interest_rate": 0,
  "enable_swaps": 0,
  "enable_hedge": 0,
  "enable_expert_Advisors": 0,
  "trading_signals": 1,
  "transfer_funds": 1,
  "push_notifications": "1",
  "daily_fixed_profit": "use unrealized profit/loss",
  "unrealized_profit": "use unrealized profit/loss",
  "level_in": "%",
  "admin_id": "100001",
  "ADMIN_id": "900003",
  "groupSuffix": "<SUFFIX>"
}
NameTypeDescriptionRequired
gnamestringName of the new group.Yes
serverstringServer / company name the group lives on.Yes
gtypestringGroup type identifier.Yes
auth, otpstringAuth and OTP toggles.Yes
currencystringDefault currency (e.g. USD).Yes
digitsnumberPrice digits for symbols.Yes
leveragenumberGroup-wide leverage.Yes
margin_call_levelnumberMargin-call threshold (%).Yes
stop_out_levelnumberStop-out threshold (%).Yes
max_orders, max_symbols, max_positionsnumberPer-account caps.Yes
enable_swaps, enable_hedge, enable_expert_AdvisorsnumberFeature toggles (0 / 1).Yes
compensate_negative_balance, stop_out_fully_hedged, virtual_creditnumberRisk-management toggles.Yes
trading_signals, transfer_fundsnumberAllow signals / transfers.Yes
min_password_length, force_otp_usagenumberSecurity policy.Yes
change_password_at_first_loginnumberForce first-login password reset.Yes
level_instringLevel indicator unit (e.g. %).Yes
admin_id, ADMIN_idstringOwning admin / ADMIN.Yes
groupSuffixstringSymbol suffix appended for this group.Yes
company, withdrawal_url, deposit_url, support_email, symbols, margin_risk_management, floating_leverage_profile, template_folderstringOptional overrides.Optional
Returns the created group with its assigned group_id and a status flag.