Using the Partner API

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

The Partner API is how you embed Coinpes trading in your own product. Your users sign in on Coinpes. After they consent, you call trading routes on their behalf with a short-lived access token. Referral attribution happens on that first consent if they were not already tagged.

Think of three layers. OAuth proves who the trader is. REST and WebSocket move money and prices for that one user. Webhooks notify your server about referred traders across the book — including people who never opened your UI.

What you can build

  • A white-label app where people buy, sell, and open contracts without leaving your screens.
  • Live balances, quotes, and open positions via WebSocket, with REST as the source of truth after a reconnect.
  • Server jobs that react when referred traders register, fill orders, settle contracts, or generate commission.

Start in sandbox with a partner_test_* client and accountType: "demo". Demo never pays commission, which is what you want while the plumbing is wrong.

What stays in the dashboard

Referral stats, commission totals, payout status, OAuth apps, and webhook URLs are not Partner API resources. Open Referrals in Trade to copy your link, create sandbox or live apps (client id and secret), add HTTPS endpoints, and send a test delivery. The secret is shown once at create or rotate.

Trader lists on that page use anonymized ids such as TR-10482. Email and phone never appear on partner routes or in the dashboard table.

How a session works

  1. Your user clicks Connect Coinpes (or an equivalent button in your app).
  2. The browser goes to Coinpes's authorize URL with PKCE. They sign in or register, then allow your app and the scopes you requested.
  3. Coinpes redirects to your registered URI with a one-time authorization code. If they were not already referred, they are linked to your partner on allow.
  4. Your server exchanges the code plus code_verifier and client secret for access and refresh tokens.
  5. Call /v1 with Authorization: Bearer. Default account is demo until you pass accountType: "real" on a live client.

Demo first

Omit accountType or set it to demo until quotes, orders, and error handling look right in your UI. Sandbox OAuth clients cannot operate real wallets. When you go live, use a separate partner_live_* secret on production hosts only.

Suggested reading order

  1. Connect users with OAuth (PKCE and token storage).
  2. Place trades from your app (accounts, then orders).
  3. Stream prices and positions (WebSocket + REST gap fill).
  4. Receive webhook events (HMAC, Test in Referrals, delivery log).
  5. Clone and deploy the example app (GitHub + Vercel).
  6. Test in sandbox, then lock down credentials.

Users are never created through the API. They register during OAuth. Email, phone, and legal name are never returned on partner routes.

Endpoint catalog: Partner API reference.

Frequently asked questions

Does the Partner API create Coinpes users?
No. Users sign in or register on Coinpes during OAuth. There is no user-create endpoint.
Where do I see referral stats and commissions?
In Trade → Referrals. The Partner API is for trading on an authorized user, not for exporting the partner dashboard.
When is a user tagged as my referral?
On first OAuth consent, if they were not already tagged to another partner. You can also share your signup link for people who never go through OAuth.

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.