Place trades from your app

Published on August 2026

Reading Time: 6 Minutes

By Coinpes Team

Open a demo wallet and trade the same 1.95× payout rules — no slideware.

Introduction

After you have a user access token, trading lives under /v1. Send Authorization: Bearer. Money fields are strings, not floats. Default account is demo unless you set accountType to real.

Reads need trade:read or account:read. CFD writes need trade:write. Timed contracts need contract:write (and contract:read to list them). Live funds also need a partner_live_* client. Sandbox clients can only touch demo wallets.

List wallets first

Call GET /v1/accounts to see demo and real wallets, balances, and account ids. Show the user which book they are about to trade. Use GET /v1/accounts/risk for margin, equity, and free margin on one account type before you enable Buy.

If the real wallet is empty, keep the UI on demo or send them to deposit in Trade. Do not silently flip accountType to real.

CFD / Market orders

Quote with GET /v1/quotes when you need bid/ask on the confirm screen. Then POST /v1/orders with symbol, side, quantity, and accountType. Optional leverage, stop loss, and take profit follow the same rules as the Trade ticket.

Send a unique Idempotency-Key header on every write. Generate it when the user taps Buy (a UUID is enough). If the request times out, retry with the same key. A new key is a new order.

Timed contracts

Contract placement uses the contract routes in the Trading API reference. Pass the user token, symbol, contract type (Rise, Fall, Higher, and the rest), stake, duration, and account type. Barrier and digit prediction are required only for those families — same as the dashboard form.

Stake and duration lock at placement. Return rate is computed by the platform. After settle, either poll the contract resource or listen for contract.settled on your webhook if you also track referrals.

Idempotency

Network blips are common on mobile. If you create a new key after a 504, you can open two positions. Store the key with the in-flight intent until you have an order id, then discard it.

After the fill

REST confirms the order. For a live book, subscribe on the WebSocket. Partner-wide referral events (fills from traders who are not this OAuth user) still arrive on webhooks, not on this socket.

Real writes need trade:write and a live OAuth client. Sandbox clients can only operate on demo accounts.

Full path list: Trading API reference.

Frequently asked questions

What account is used if I omit accountType?
Demo. Set accountType to real only when the user is funding live trades and you have a live OAuth client.
What does Idempotency-Key do?
It ties retries to one user intent. Reuse the same key after a timeout; a new key opens a new order.
Which scope do writes need?
trade:write on the user access token. Listing wallets uses account:read.

Contact us

Get help with Coinpes trading and accounts

Whether you are learning contracts on demo, funding a live wallet, or need help with positions and payouts, tell us what you need and our team will follow up.

By submitting this form, you agree to Coinpes's Terms of Use and acknowledge our privacy information.