API for developers Order timing

Order timing API: instant or at the message's time

Order timing API: set how a channel's binary signals open, at once or at the time in the message on the provider's clock, and a default expiry.

How a channel's signals open

Each channel that trades binary options says how its messages give the order. It is asked when the channel is linked to a binary account (and in the app's ACTION NEEDED until it is answered), and set with PATCH /api/v1/channels/C:

entry_modeMeans
instantThe trade opens the moment the message arrives. A clock time in the message is when it expires, on the provider's clock (tz_offset_min).
timedThe trade opens at the time the message names - "Enter At: 21:19", "USD/BRL;09:35;PUT" - on the provider's clock: tz_offset_min, minutes from GMT (360 is GMT+06:00, -180 is GMT-03:00).
by_minuteOnly the minute of the time counts, on the next hour that has it - for a provider whose timezone is not known.
""Not answered yet: GET /api/v1/status lists it under action_needed (item time:C).

default_duration is how long a trade runs, in seconds, when its message gives no expiry. 0 trades no such message - and while they go untraded the channel is in action_needed (item exp:C).

# what is set now - and "suggest": the provider's timezone as its own messages show it
curl -H "Authorization: Bearer $TPC_KEY" https://tpcopier.com/api/v1/channels/C/timing

# at the time in the message, on GMT+06:00, 1 minute when a message gives no expiry
curl -X PATCH -H "Authorization: Bearer $TPC_KEY" -H "Content-Type: application/json" \
     -d '{"entry_mode":"timed","tz_offset_min":360,"default_duration":60}' https://tpcopier.com/api/v1/channels/C

What happens to a timed signal

  • It waits for its time and opens on that candle. Its reason (GET /api/v1/signals) says "Scheduled for 09:35", then "Traded at its time, 09:35 UTC".
  • A time more than 5 minutes past, or more than 3 hours ahead, is refused rather than traded late - the reason says which.
  • Martingale "by message" (the default): a gale goes only when the signal's own message gives it ("1º GALE", "MARTINGALA A LAS 17:05", "Até 2 gales") - as many as it gives, each on the next expiry at double the stake.
  • With an account's own martingale and "one trade at a time", a trade that ends just as the next signal's time comes is waited for (a few seconds): a win lets the next signal trade; after a loss, its recovery step takes the slot.

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.

appStatus, signals, trades, accounts and settings
GET/api/v1/channels/{cid}/timingChannel Timing

A channel's order timing, the customer's own GMT offset as the first guess for its timezone, and the last time its signals named (signals.expiry_time) - for the question asked when it is linked to a binary account.

Parameters

cid *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/channels/{cid}/timing"
PATCH/api/v1/channels/{cid}Patch Channel

Parameters

cid *pathinteger

Request body

{
  "monitored": false,
  "favorite": false,
  "color": "",
  "category": "",
  "min_confidence": "",
  "min_payout": 0,
  "max_signals_per_hour": 0,
  "stake_override": 0,
  "allowed_directions": "",
  "entry_mode": "",
  "tz_offset_min": 0,
  "default_duration": 0,
  "read_images": ""
}

Responses

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

Example

curl -X PATCH -H "Authorization: Bearer $TPC_KEY" -H "Content-Type: application/json" \
     -d '{"monitored": false, "favorite": false, "color": "", "category": "", "min_confidence": "", "min_payout": 0, "max_signals_per_hour": 0, "stake_override": 0, "allowed_directions": "", "entry_mode": "", "tz_offset_min": 0, "default_duration": 0, "read_images": ""}' \
     "https://tpcopier.com/api/v1/channels/{cid}"