canonical: https://jentic.com/apis/coindcx.com/coindcx

# CoinDCX API

Jentic publishes the only available OpenAPI specification for CoinDCX API, keeping it validated and agent-ready. CoinDCX is an Indian cryptocurrency exchange whose REST API exposes public market data plus authenticated trading, margin, funding, and wallet operations. The endpoint set covers tickers, order books, candles, balance lookups, spot order placement and cancellation, margin orders, funding lend/settle, and inter-wallet transfers.

## For AI agents

Place spot and margin orders, query balances, and pull live market data on the CoinDCX cryptocurrency exchange.

## Scope

Does not handle KYC onboarding, fiat deposits, or off-platform wallet management - use for CoinDCX market data and trading operations only.

## Capabilities

- Retrieve ticker prices, order books, and OHLCV candles for any CoinDCX market
- List market metadata including trading pairs and contract details
- Place spot orders individually or in batches and cancel by id, market, or in bulk
- Edit and inspect the status of active orders on the exchange
- Place and exit margin orders against authorised pairs
- Lend, settle, and rebalance funds across wallets and margin accounts
- Look up account balances and user information for the authenticated trader

## Use cases

### Algorithmic Spot Trading on CoinDCX

Run automated trading strategies on CoinDCX by combining live market data with the order placement and cancellation endpoints. Strategies can submit single or batched orders, monitor active orders, and unwind positions on signal. Suitable for Indian retail and prop traders building bots against INR-quoted pairs.

Example prompt: Submit a limit buy order via POST `/exchange/v1/orders/create` for BTCINR at a specified price and size and return the order id

### Portfolio Monitoring and Reporting

Build a dashboard that tracks balances, open orders, and trade history across spot and margin accounts on CoinDCX. The user info, balances, and order endpoints provide all the data needed for reconciliation and tax reporting in INR. Useful for traders and accountants managing crypto holdings under Indian regulations.

Example prompt: Call POST `/exchange/v1/users/balances` and POST `/exchange/v1/orders/active_orders` to assemble a current portfolio snapshot

### Margin Trading Automation

Automate margin order placement, monitoring, and exit on CoinDCX. The margin endpoints support creating new margin orders, cancelling them, and exiting an open position, while the funding endpoints let strategies lend or settle borrowed funds. Designed for traders running leveraged strategies on supported pairs.

Example prompt: Open a margin long via POST `/exchange/v1/margin/orders/create` on a chosen pair, then monitor and call POST `/exchange/v1/margin/orders/exit` when the strategy signals close

### AI Trading Agent via Jentic

Build an AI agent that retrieves CoinDCX market data and places trades through Jentic. The agent expresses an intent in natural language; Jentic resolves the right CoinDCX endpoint, validates parameters against the schema, and executes the call with stored credentials so signing and key handling stay outside the agent context.

Example prompt: Through Jentic, place a small spot buy order on BTCINR and return the order id and acceptance status

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/exchange/ticker` | Get latest tickers for all markets |
| GET | `/market_data/orderbook` | Retrieve order book snapshot for a market |
| POST | `/exchange/v1/orders/create` | Place a spot order |
| POST | `/exchange/v1/orders/cancel` | Cancel a single order |
| POST | `/exchange/v1/users/balances` | Get balances for the authenticated account |
| POST | `/exchange/v1/margin/orders/create` | Place a margin order |

## Key resources

- **Markets and Tickers** — Public market metadata and ticker prices
- **Market Data** — Order book snapshots, trade history, and OHLCV candles
- **Users** — Account info and balance lookups
- **Orders** — Spot order create, edit, status, cancel, and history
- **Margin** — Margin order create, cancel, and exit
- **Funding** — Lend and settle funds in the funding market
- **Wallets** — Transfer funds between wallets

## Why Jentic

- **Setup:** Wiring CoinDCX by hand means managing its X-AUTH-APIKEY header plus computing an HMAC-SHA256 signature over each JSON payload, and choosing between the api.coindcx.com and public data hosts yourself. Through Jentic you install once, import CoinDCX from the API Directory, store the key and secret once, and your agent calls it.
- **Permission scoping:** CoinDCX takes the order and market target in the request body, so you scope by operations: limit the agent to the calls it needs, such as reading a ticker or the order book, so trading operations like placing or cancelling an order are not included unless you add them.
- **Credential handling:** Your CoinDCX API key and signing secret are stored once, encrypted, by your own Jentic One instance and the request is signed at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'place a spot buy order' or 'get the current order book', and Jentic returns the matching CoinDCX operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Binance API** — Global crypto exchange with deeper liquidity and a far broader endpoint set
- **Kraken API** — Established global exchange with strong fiat on-ramps and futures support
- **CoinGecko API** — Cross-exchange reference prices and market metadata

## FAQ

### Why is there no official OpenAPI spec for CoinDCX API?

CoinDCX does not publish an OpenAPI specification on its developer portal. Jentic generates and maintains this spec so that AI agents and developers can call CoinDCX API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the CoinDCX API use?

Authenticated endpoints require an API key in the X-AUTH-APIKEY header plus a HMAC SHA-256 signature in the X-AUTH-SIGNATURE header computed over the request body. Through Jentic, both the key and the signing secret are stored in the encrypted vault and signing happens server-side.

### Can I place margin orders with the CoinDCX API?

Yes. POST `/exchange/v1/margin/orders/create` opens a margin position on supported pairs, POST `/exchange/v1/margin/orders/cancel` cancels a pending margin order, and POST `/exchange/v1/margin/orders/exit` closes an open position.

### What are the rate limits for the CoinDCX API?

CoinDCX enforces per-endpoint and per-account rate limits that vary between public and authenticated calls. The OpenAPI spec does not declare exact thresholds; check your account tier in the CoinDCX dashboard for current limits.

### How do I cancel all of my open orders through Jentic?

Install the SDK with pip install jentic, search Jentic for cancel all open orders coindcx, load the schema for POST `/exchange/v1/orders/cancel_all`, and execute the call. Jentic handles signing with your stored credentials.

### Does CoinDCX support batched order placement?

Yes. POST `/exchange/v1/orders/create_multiple` accepts a list of order specifications and submits them in a single request, which is useful for grid strategies and basket execution.

### Can I limit what my agent is allowed to do with the CoinDCX API?

Yes. Because you run Jentic One yourself, your own rules decide which CoinDCX operations and credentials the agent may use. You can allow read-only calls such as GET `/exchange/ticker` and the order book while withholding POST `/exchange/v1/orders/create`, `/orders/cancel`, and the margin endpoints, so the agent cannot place or cancel trades unless you grant those operations. This lets an operator hand an agent live market data without exposing spot or margin trading.
