CPlugin

TradePlatforms

API v1 (legacy) · General · 3 operations · base URL https://cloud.mywebapi.com · OpenAPI v1 (JSON) · Redoc

Manage trade platforms

Every call needs Authorization: Bearer $TOKEN — an OAuth 2.0 client-credentials token (scope webapi). The token server belongs to the environment: for the Sandbox call https://pre.mywebapi.com and take the token from https://pre.auth.cplugin.net/connect/token; for Production take it from https://auth.cplugin.net/connect/token. Clients and tokens of the two are separate — a token from one answers 401 on the other. $TRADE_PLATFORM_ID is the id of a trade platform registered in Toolbox. A failure is an HTTP error code, with the X-Request-Outcome header where it applies — see Errors.

Operations

All Trade Platforms

GET /api/TradePlatforms

Responses

Example

curl "https://cloud.mywebapi.com/api/TradePlatforms" \
  -H "Authorization: Bearer $TOKEN"

Trade Platform

GET /api/TradePlatforms/{tradePlatform}

Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.

Responses

Example

curl "https://cloud.mywebapi.com/api/TradePlatforms/$TRADE_PLATFORM_ID" \
  -H "Authorization: Bearer $TOKEN"

Status of the trade-server connection

GET /api/TradePlatforms/{tradePlatform}/Ping

Connects to the trade server if needed and checks that it answers.

Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.

Responses

Example

curl "https://cloud.mywebapi.com/api/TradePlatforms/$TRADE_PLATFORM_ID/Ping" \
  -H "Authorization: Bearer $TOKEN"

Schemas

Types the operations above take and return, with their first-level properties; * marks a required one. The full graph is in the OpenAPI specification.

TradePlatform

PropertyTypeDescription
id string (uuid)
name string, nullable
type TradePlatformType
organizationId string (uuid)
organization Organization
created string (date-time)

TradePlatformType

Values: MT4, MT5, MatchTrader

Organization

PropertyTypeDescription
id string (uuid)
name string, nullable
created string (date-time)