Broker API HubMenu

cTrader ProtoOARefreshTokenRes

messageProtoOARefreshTokenRescTrader Open APIpayloadType 2174Authorisation

Returns the new access token, how long it lasts and a new refresh token.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Independent and unofficialhelp.ctrader.comchecked The definition file it was checked against

This is a message of the cTrader Open API, not an HTTP endpoint. It has no method and no path: it is sent over an open TCP or WebSocket connection, as Protocol Buffers or as JSON.

The message

Name
ProtoOARefreshTokenRes
Direction
Response, sent by the server
Payload type
PROTO_OA_REFRESH_TOKEN_RES, number 2174. This number is what identifies the message on the wire.

Fields

NameTypeDescription
payloadTypeProtoOAPayloadTypeIdentifies the message. Its default in the definition is PROTO_OA_REFRESH_TOKEN_RES, which is number 2174.
accessTokenrequiredstringThe new access token. A credential: keep it out of source code and logs.
tokenTyperequiredstringThe kind of token. The definition gives the value bearer.
expiresInrequiredint64How long the new access token lasts, in seconds.
refreshTokenrequiredstringThe new refresh token, which replaces the one that was sent.

Limits that apply at cTrader Open API

LimitValueScopeSource
Requests a second, not historical data50Per connection, requests that are not for historical datahelp.ctrader.comchecked
Requests a second, historical data5Per connection, historical data requests onlyhelp.ctrader.comchecked