Cardiv
Trading API

Overview

One API for every Cardiv account, how it is shaped, and where to connect.

Cardiv has one trading API. Every account issues its own key in the app and uses it on the same routes, whether that is a person trading their own wallet from a script or a firm quoting two-sided prices. A market maker is an ordinary account with a policy attached by WolfEdge: no fees, an order id prefix of its own, and per-account limits. The routes are the same; only what they do with the request differs. Market maker programme covers registration.

What you get

  • Public market data with no credential: the pairs, the order book and the tape.
  • Your account, orders and balances behind the key, scoped to your own party and nothing else.
  • Placement and cancellation as prepare, sign, submit. Cardiv builds the transaction and returns a hash, you sign it with your wallet's Ed25519 key, and the signed payload goes to Calden. Cardiv never holds a signing key and cannot place, change or cancel an order for you. That single constraint is why there is no one-shot order endpoint and no amend.

A key alone can read your state and prepare transactions in your name. It cannot sign them, so it cannot move funds; an unsigned prepare expires after 5 minutes with nothing locked and nothing charged.

What you need

  • A Calden wallet connected to Cardiv, with preapprovals for every token you can receive on the pairs you trade. A missing one refuses an otherwise valid order at placement, and a missing one on the other side fails a settlement against you.
  • Funds on the side you trade. A buy locks the quote token, a sell locks the base.
  • Your wallet's Ed25519 private key, exported once from Calden (Settings, Backup Keys, Reveal private key) into wherever you keep signing keys. There is no escrow and no recovery service for it.
  • An API key from the app. API keys covers it.

Where to connect

EnvironmentAppBase URL
Devnethttps://beta.app.cardiv.xyzhttps://api.beta.cardiv.xyz/api/trade/v1
Mainnethttps://app.cardiv.xyzhttps://api.cardiv.xyz/api/trade/v1

A key is scoped to the environment that issued it. Every integration starts on devnet; Try it on devnet first sets you up. The pairs differ per environment, so read them from GET /pairs rather than assuming.

Every route on the pages that follow is relative to the base URL. Responses use the envelope {"ok": true, "data": ...}; errors use {"ok": false, "error": {"code", "message"}}. The same key also works on the app's own /api/v1 routes, whose responses are shaped for the browser; the pages here document the trade surface, which is the one to build against.

Need help

Write to support@wolfedgelabs.com and include your party ID.

On this page

Up next

API keys

Need help

Write to support@wolfedgelabs.com and include your party ID.