API for developers Status, signals and trades

Status, signals and trades API

Trade copier status API: read what is connected and what needs action, every message read and what it became, and every order with its result.

Read everything

curl -H "Authorization: Bearer $TPC_KEY" https://tpcopier.com/api/v1/me         # who the key acts as
curl -H "Authorization: Bearer $TPC_KEY" https://tpcopier.com/api/v1/status     # what is signed in and connected, and action_needed: what stops trades now
                                                  #   (an account down, a channel's order timing to answer, the free trial's day used up)
curl -H "Authorization: Bearer $TPC_KEY" https://tpcopier.com/api/v1/bridge     # chats, feeds, accounts and every link between them
curl -H "Authorization: Bearer $TPC_KEY" https://tpcopier.com/api/v1/hosting    # cloud MT4/MT5 accounts (state, balance, equity, open positions) and copier pipelines
curl -H "Authorization: Bearer $TPC_KEY" https://tpcopier.com/api/v1/signals    # every message read, and what it was understood as
curl -H "Authorization: Bearer $TPC_KEY" https://tpcopier.com/api/v1/trades     # broker orders and their results
A cloud account's stateMeans
unlinkedadded; it starts when it is linked (a sender: when its first receiver is added)
waiting / cloningbeing made on our cloud server - a minute or two
readysigned in: connected says the broker connection, algo_on MetaTrader's Algo Trading
failederror says why - a wrong password is fixed with POST /api/v1/hosting/accounts/{id}/password
wrong: "login"the broker refused the account number or password - tell your customer Incorrect login or password. The password is typed again with POST /api/v1/hosting/accounts/{id}/password, another account number or server with POST /api/v1/hosting/accounts/{id}/replace
wrong: "server"MetaTrader does not know that server - Incorrect server: pick it from GET /api/v1/hosting/brokers and POST /api/v1/hosting/accounts/{id}/replace
review: truein process: its sign-in failed for a reason our team puts right - nothing for your customer to do; it signs in by itself once it is fixed
stoppedthe plan or free trial does not cover it now - detail says why
held: truerestarted too often today; POST /api/v1/hosting/accounts/{id}/action with {"action":"reconnect"} tries again

A pipeline that does not copy says why in paused_why; a refused order or signal says why in the history.

Further reading: the OpenAPI Specification our API description follows.

Endpoints in this guide

Base address https://tpcopier.com. Send your key with every request - Authorization: Bearer tpc_... - up to 120 requests a minute. Open an endpoint for its fields, its answers and an example.

bridgeSignal sources, accounts and the links between them
GET/api/v1/bridgeBridge

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/bridge"
GET/api/v1/bridge/links/{lid}/historyLink History

One link's results and trades, from the moment it was made.

Parameters

lid *pathinteger
limitqueryinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/bridge/links/{lid}/history"
GET/api/v1/bridge/copiesCopies

What the copier saw open on each main account, and what it placed for it.

Parameters

limitqueryinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/bridge/copies"
hostingCloud MetaTrader and the MT4/5 trade copier
GET/api/v1/hostingHosting

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/hosting"
GET/api/v1/hosting/accounts/{aid}/logHosted Log

This hosted account's log: connecting, Algo Trading, refusals, trades and copies.

Parameters

aid *pathinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/hosting/accounts/{aid}/log"
appStatus, signals, trades, accounts and settings
GET/api/v1/statusStatus

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/status"
POST/api/v1/kill-switchKill Switch

Request body

{
  "on": false
}

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -X POST -H "Authorization: Bearer $TPC_KEY" -H "Content-Type: application/json" \
     -d '{"on": false}' \
     "https://tpcopier.com/api/v1/kill-switch"
POST/api/v1/pausePause

Request body

{
  "on": false
}

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -X POST -H "Authorization: Bearer $TPC_KEY" -H "Content-Type: application/json" \
     -d '{"on": false}' \
     "https://tpcopier.com/api/v1/pause"
GET/api/v1/dashboardDashboard

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/dashboard"
GET/api/v1/signalsSignals

Parameters

channelqueryinteger
actionablequeryinteger
executedqueryinteger
directionquerystring
with_tradesqueryinteger
limitqueryinteger
offsetqueryinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/signals"
GET/api/v1/signals/{sid}Signal Detail

Parameters

sid *pathinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/signals/{sid}"
GET/api/v1/tradesTrades

Every trade, newest first, and the totals of exactly the trades asked for - money per currency, never added across. format=csv: every match as a file.

Parameters

accountqueryinteger
resultquerystring
directionquerystring
daysqueryinteger
date_fromquerystring
date_toquerystring
bridgequerystring
brokerquerystring
qquerystring
settledqueryinteger
formatquerystring
limitqueryinteger
offsetqueryinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/trades"
GET/api/v1/analyticsAnalytics

What made and what lost money: the binary trades the brokers took (tests left out), in ONE currency - the one asked for, else the most traded; money is never added across currencies and `currencies` names the others. account: that account's trades only. Days and hours are UTC.

Parameters

daysqueryinteger
currencyquerystring
accountqueryinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/analytics"
GET/api/v1/broker/accounts/{aid}/historyAccount History

The broker's OWN list of deals on this account's current balance, read live - trades placed by hand included. Each deal the site placed is marked with its trade number, so a result can be checked against the broker in one look.

Parameters

aid *pathinteger
limitqueryinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/broker/accounts/{aid}/history"
GET/api/v1/calendarCalendar

The profit calendar: each day of a month, per currency - binary trades as they settled (by the day they closed, UTC), MetaTrader as the balance change its EA reported. account: that account only.

Parameters

monthquerystring
accountqueryinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/calendar"
GET/api/v1/notificationsNotifications

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/notifications"
POST/api/v1/notifications/{nid}/seenNotification Seen

A note shown in its window (status.notice): seen, so no device shows it again.

Parameters

nid *pathinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -X POST -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/notifications/{nid}/seen"
POST/api/v1/notifications/readNotifications Read

Opening the bell marks what was shown as seen (the dot on the bell goes away).

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -X POST -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/notifications/read"
GET/api/v1/eventsEvents

Parameters

limitqueryinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/events"
GET/api/v1/onboardingOnboarding

The Dashboard's set-up checklist: the steps of the bridges this workspace picked (one list, each step once), ticked off from its own data. A step TPcopier cannot see - inside MetaTrader or the Indian software - is on the Bridge page, not counted here.

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/onboarding"
liveTelegram sign-in and channels
GET/api/v1/engineEngine Status

Proof that the engine is running independently of this browser.

The dashboard is a window onto the engine, not the engine itself: closing the tab, signing out or restarting the machine does not stop signals being read and traded. This is what lets the page say so honestly.

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/engine"
latencyMeasured speed of signals and copies
GET/api/v1/latencyLatency

Parameters

hoursqueryinteger
accountqueryinteger

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/latency"
authYour profile
GET/api/v1/meMe

Responses

200 Successful Response · 422 Validation Error · 401 402 403 429 - see Errors

Example

curl -H "Authorization: Bearer $TPC_KEY" \
     "https://tpcopier.com/api/v1/me"