Broker API HubMenu

Deriv contracts_for

messagecontracts_forDeriv WebSocket APIWebSocketMarket data

Lists the contracts that can be bought on one symbol now, with the barrier, stake and duration limits of each. On a logged in connection only the contracts that account may trade are returned.

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 unofficialdevelopers.deriv.comchecked The definition file it was checked against

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

The message

Name
contracts_for
Direction
Request, sent by the client
Carried by
WebSocket. Deriv's page marks this call as needing no login, so it can be sent on the public connection as well. The demo and real addresses are not opened as printed: POST /trading/v1/options/accounts/{accountId}/otp returns the address for one account with a one time password already in it.
Public market data, no login
wss://api.derivws.com/trading/v1/options/ws/public
Demo account
wss://api.derivws.com/trading/v1/options/ws/demo
Real account
wss://api.derivws.com/trading/v1/options/ws/real

Fields

NameTypeDescription
contracts_forrequiredstringThe symbol, by the short name that active_symbols returns.
passthroughobjectAnything you want carried through the call. It comes back unchanged inside echo_req.
req_idintegerA number of your own that is returned on the answer, so answers can be matched to requests.

What arrives

contracts_for: The contracts on offer for the symbol. Each entry of available describes one, and the fields listed here are a selection of what an entry can hold.

NameTypeDescription
contracts_for.availablerequiredarray of objectsOne entry for each contract on offer. It holds at least one.
contracts_for.available[].contract_typerequiredstringThe contract type, in the form proposal and buy take.
contracts_for.available[].contract_categoryrequiredstringThe category the contract type belongs to.
contracts_for.available[].min_contract_durationrequiredstringThe shortest duration the contract can be bought for.
contracts_for.available[].max_contract_durationrequiredstringThe longest duration the contract can be bought for.
contracts_for.available[].min_stakenumberThe smallest stake accepted.
contracts_for.available[].max_stakenumberThe largest stake accepted.
contracts_for.available[].underlying_symbolrequiredstringThe symbol the contract is on.
contracts_for.hit_countnumberHow many contracts are on offer.
echo_reqrequiredobjectA copy of the request that was sent.
msg_typerequiredstringNames the kind of answer. Here it is contracts_for.
req_idintegerThe number the request carried. Present only where the request had one.

Sample

Written by this site from the fields recorded on this page. It has not been run against a terminal, a server or an account, and the values in it are placeholders. No credential is typed into it: where a field holds one, the placeholder says where it comes from. Nothing is entered on this site.

{
  "contracts_for": "R_50"
}

Limits that apply at Deriv

LimitValueScopeSource
Headline limit80/min per logged in user (REST)Sources conflict developers.deriv.com states 60, checked . Deriv's API overview in the text form it publishes for AI tools gives REST 60 requests a minute per token, where its Limits page gives 80 a minute per logged in user. The same overview also gives 100 WebSocket requests a second per connection, 100 active subscriptions per connection and 5 concurrent WebSocket connections per user, none of which the Limits page mentions. Deriv's own pages disagree; the conflict is labelled, not resolved. Pace against 60.user, RESTdevelopers.deriv.comchecked