GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing docs.delta.exchange (truncated) β€” Delta Exchange Api

Delta Exchange MCP Server β€” call API endpoints from your AI agents Read more β†’
NAV Navbar
Logo
Python cURL Ruby
    • Introduction
    • General Information
      • Definitions
      • Symbology
      • Pagination
    • Authentication
      • Common Errors
      • Generating an API Key
      • API Key Permissions
      • Creating a Request
      • Signing a Message
    • Rate Limits
      • API & product rate limits
      • Increasing your rate limits
    • System Status
    • Types
      • Timestamps
      • Numbers
      • IDs
    • Response Formats
    • Spot Trading
    • MCP Server
    • Rest Api
    • Assets
      • Get list of all assets
    • Indices
      • Get indices
    • Products
      • Get list of products
      • Get product by symbol
      • Get tickers for products
      • Get ticker for a product by symbol
      • Get option chain
    • Orders
      • Place Order
      • Cancel Order
      • Edit Order
      • Get Active Orders
      • Place Bracket order
      • Edit Bracket order
      • Cancel all open orders
      • Create batch orders
      • Edit batch orders
      • Delete batch orders
      • Get Order by id
      • Get Order by client oid
      • Change order leverage
      • Get order leverage
    • Positions
      • Get margined positions
      • Get position
      • Auto Topup
      • Add/Remove position margin
      • Close all positions
    • TradeHistory
      • Get order history (cancelled and closed)
      • GET user fills by filters
      • Download Fills history
    • Orderbook
      • Get L2 orderbook
    • Trades
      • Get public trades
    • Wallet
      • Get Wallet Balances
      • Get Wallet transactions
      • Download Wallet transactions
      • Request asset transfer
      • Request subaccount balance transfer history.
    • Stats
      • Get volume stats
    • MMP
      • Update MMP config
      • Reset MMP
    • Account
      • Get users trading preferences
      • Update users trading preferences
      • Get subaccounts
      • Change margin mode
      • Get current rate limit quota
    • Heartbeat Management
      • Create Heartbeat
      • Send Heartbeat Acknowledgment
      • Get Heartbeats
    • Settlement Prices
      • Get product settlement prices
    • Historical OHLC Candles/Sparklines
      • GET historical ohlc candles
      • GET product history sparklines
    • Schemas
      • ApiSuccessResponse
      • ApiErrorResponse
      • Index
      • ArrayOfIndices
      • ProductSpecs
      • Asset
      • ArrayOfAssets
      • Product
      • ProductCategories
      • ArrayOfProducts
      • Order
      • ArrayOfOrders
      • CreateOrderRequest
      • BatchCreateOrder
      • BatchCreateOrdersRequest
      • ArrayOfCreateOrderRequest
      • EditOrderRequest
      • BatchEditOrder
      • BatchEditOrdersRequest
      • CreateBracketOrderRequest
      • EditBracketOrderRequest
      • BatchDeleteOrder
      • DeleteOrderRequest
      • CancelAllFilterObject
      • BatchDeleteOrdersRequest
      • Position
      • ArrayOfPositions
      • Fill
      • ArrayOfFills
      • FillMetaData
      • OrderLeverage
      • L2Orderbook
      • Trades
      • Wallet
      • WalletPayload
      • WalletMetaData
      • ArrayOfWallets
      • AssetTransferSubaccountReq
      • SubaccountTransferHistory
      • TransactionTypes
      • Transaction
      • ArrayOfTransactions
      • SubaccountTransferLog
      • ArrayOfSubaccountTransferLog
      • greeks
      • price_band
      • quotes
      • Ticker
      • ArrayOfTickers
      • PaginationMeta
      • OHLCData
      • ArrayOfOHLCData
      • SparklineData
      • Stats
      • MMPConfigUpdateRequest
      • MMPResetRequest
      • ChangeMarginModeRequest
      • UserPreference
      • EditUserPreference
      • User
      • ChangeMarginModeResponse
      • CreateHeartbeat
      • HeartbeatConfig
      • HeartbeatResponse
      • HeartbeatAck
      • HeartbeatAckResponse
      • ArrayOfHeartbeats
      • Heartbeat
      • ArrayOfSubaccouns
      • RateLimitQuotaResponse
    • Deadman Switch
      • Overview
      • Authentication
      • Heartbeat Management
      • Implementation Guidelines
      • Error Codes
      • Security Considerations
    • TradingView Webhook Order Integration
      • Required Fields
      • How to Fix
    • Place order errors
    • Edit order errors
    • Errors
    • Rest Clients
      • CCXT
    • Websocket Feed
    • Subscribing to Channels
      • Subscribe
      • Unsubscribe
    • Authenticating
      • Current method
    • Sample Python Code
      • Public Channels
      • Private Channels
    • Detecting Connection Drops
      • Heartbeat (Recommended)
      • Ping/Pong
    • Public Channels
      • ticker
      • ob_l1
      • ob_l2
      • ob_updates
      • trades
      • mark_price
      • candlesticks
      • spot_price
      • spot_30mtwap_price
      • funding_rate
      • product_updates
      • system_status
    • Private Channels
      • Margins
      • Positions
      • Orders
      • UserTrades
      • v2/user_trades
      • PortfolioMargins
      • MMP Trigger
    • Changelog
      • 16.10.26
      • 14.10.26
      • 31.08.26
      • 19.08.26
      • 03.06.26
      • 20.05.26
      • 17.04.26
      • 15.04.26
      • 13.01.26
      • 11.12.25
      • 08.10.25
      • 01.06.25
      • 21.03.25
      • 20.02.25
      • 18.10.2024
      • 01.05.2024
      • V2 Rest Api
      • New Socket Channels
    • Security
      • Targets In scope
      • How to access
      • Reward range
      • Rules of engagement
      • Rules of reporting
      • Recommended Reporting format
      • Ineligible issues
    • Download Documentation
      Markdown (.md) PDF

    Introduction

    Welcome to the Delta Exchange API! You can use this API to place orders on Delta Exchange and listen to market feed.

    We have language bindings in Shell, Python, Ruby and Nodejs! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

    Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

    General Information

    Definitions

    Assets: are cryptocurrencies or fiat currencies. Each asset has a 3/4 letter code (e.g. BTC, USDC). A derivative contract on Delta Exchange will entail multiple assets, namely:

    • Underlying Asset: This is the asset over which a futures or perpetual contract is defined. For e.g. the underlying asset of the BTCUSD perpetual contract is BTC.

    • Quoting Asset: The asset in which price of the quoting is called the quoting asset. For e.g. the BTCUSD contract is quoted in USD. Therefore, the quoting asset of the contract is USD.

    • Settling Asset: The asset in which the margin and Profit/ Loss of a contract is denominated. For e.g. the BTCUSD contract is margined and settled in USD. Therefore, the settling asset of the contract is USD.

    Products: are the derivative contracts listed on Delta Exchange. Each contract can be referred by either its Product ID (e.g. 27 is the Product ID of BTCUSD contract) or Symbol (BTCUSD is the symbol for BTCUSD contract). It is worth noting that Orders, Orderbook APIs expect Product IDs. e.g.

    product_id symbol product_type description
    27 BTCUSD perpetual_futures Bitcoin Perpetual futures margined and settled in INR
    3136 ETHUSD perpetual_futures Ethereum perpetual futures margined and settled in INR
    2000 P-BTC-38100-230124 put_options BTC put option strike price $38100 and expiring on 23/01/2024
    5000 C-BTC-55800-170224 call_options BTC call option strike price $55800 and expiring on 17/02/2024

    Symbology

    Contract symbol: has the following format

    Underlying Asset| Quoting Asset|_|Matruity Date (optional, applicable only for futures contracts)

    e.g. BTCUSD, ETHUSD

    For Options symbol:
    Option Type |-| Underlying Asset |-| Price Strikes |-| Expiry Date in ddMMYY
    e.g. C-BTC-90000-310125: C (Call Option) BTC (Bitcoin) 90000 strike price expiring on 31st Jan 2025

    Mark Price: Each contract has a unique Mark Price which can be referred to by: MARK: Contract_Symbol (MARK:BTCUSD)

    Index Price: The prices of the underlying assets for the contracts listed on Delta Exchange are obtained from various spot exchanges, and are computed by averaging prices from multiple exchanges. Details of all the indices are available on this page.

    For a given Underlying Asset/ Quoting Asset pair, the Index price symbol is: .DE|Underlying Asset|Quoting Asset| e.g. .DEBNBXBT It is important to note that the BTCUSD Index price doesn't follow this convention as its symbol is .DEXBTUSD.

    Pagination

    Pagination allows to fetch data page-wise. We use cursor based pagination where each response metadata contains a before and after cursor. The cursor needs to passed on with the next request to paginate over the result. Please note that the cursors are updated with each new page.

    Pagination can be called in following APIs

    API End point
    Products /v2/products
    Orders /v2/orders
    Orders History /v2/orders/history
    Fills /v2/fills
    Wallet transactions /v2/wallet/transactions

    Pagination parameters

    • after
      • after cursor to fetch the next page
    • before
      • before cursor to fetch the previous page
    • page_size
      • page size for pagination

    In API response, meta data will contain the cursors as show below

    {
      "success": true,
      "result": [],
      "meta": {
        "after": "an_arbitary_string",
        "before": "another_arbitary_string"
      }
    }
    

    Example

    https://api.india.delta.exchange/v2/products?page_size=30

    https://api.india.delta.exchange/v2/products?page_size=30&after=after_cursor_from_last_request

    Authentication

    Api endpoints that place orders or fetch account related information needs to authenticated using api key and api secret.

    Common Errors

    Invalid Api Key Error

    • { "success": false, "error": { "code": "invalid_api_key" } }

    Explanation: The API key in your request doesn't exist or is invalid. The most common cause is a deleted or regenerated key that is still being used by your client. This also happens when a key from the wrong environment is used (e.g. a testnet key sent to prod).

    πŸ”§ Troubleshooting

    1. Check API Key Validity

    • Log into Delta Exchange and confirm the key still exists and is active. Regenerating a key deletes the old one, so any client still using the old key will get this error.
    • Check for any typos in the key too.

    2. Verify the Correct Environment

    • API keys created at Delta India account must be used only with production apis.(prod api - https://api.india.delta.exchange)
    • API keys created at Demo account must be used only with testnet apis.(testnet api - https://cdn-ind.testnet.deltaex.org)
    • Please note that the api url https://api.delta.exchange belongs to Delta Global and it can not used here.

    SignatureExpired Error

    • { "error": "SignatureExpired", "message": "your signature has expired" }

    Explanation: This error occurs when the timestamp used to generate your API request signature is more than 5 seconds old by the time it reaches Delta Exchange servers. The platform enforces this time window to prevent replay attacks. You can check server time and request time in the api error response too.

    πŸ”§ Troubleshooting

    1. Sync Your System Clock

    • Ensure your system time is accurate using NTP (Network Time Protocol).
      • Linux/macOS: sudo ntpdate pool.ntp.org
      • Windows: Make sure the Windows Time service is running and properly synced.
    • Enable automatic time synchronization in your system settings to prevent future drifts.

    2. Check Network Latency

    • Check for any network latency on your side.
    • Use a stable and high-speed internet connection.

    3. Verify Timestamp Generation

    • Use Unix timestamp format (seconds since epoch).
    • Don't reuse stale timestamps; update the timestamp before every request.
    • Ensure the timestamp used in the signature matches the one sent in the request.
    • Refer to the sample code block on the right.
    # python code to generate signature
    timestamp = str(int(time.time()))
    signature_data = method + timestamp + path + query_string + payload
    signature = generate_signature(api_secret, signature_data)
    

    UnauthorizedApiAccess Error

    • { "error": "UnauthorizedApiAccess", "message": "Api Key not authorised to access this endpoint" }

    Explanation: Your API key doesn't have permission to access this endpoint. Delta Exchange allows permission-based control for each key. There are two permissions given 1. Read Data βœ… 2. Trading βœ…

    πŸ”§ Troubleshooting

    1. Check API Key Permissions

    • Go to API Management on Delta Exchange.
    • Verify respective permissions: 1. Read Data 2. Trading, are enabled βœ… or not.
    • If required, create a new api key with the right permissions enabled βœ….

    2. Verify Endpoint Requirements

    • Market data: requires Read Data permissions only.
    • Orders, Positions, Wallets: requires Trading permission.

    3. Consider Security Best Practices

    • Grant only necessary permissions.
    • Use separate keys for different use-cases.

    IP Not Whitelisted Error

    • { "success": false, "error": { "code": "ip_not_whitelisted_for_api_key" } }

    Explanation: This occurs when the request originates from an IP not allowed for the given API key. Delta Exchange enforces IP whitelisting as a security measure. Consider whitelisting he IP returned into the api error response.

    πŸ”§ Troubleshooting

    1. Update IP Whitelist

    • Log into Delta Exchange > API Management
    • Add your IP to the API key’s whitelist. The IP can be found into the api error response.
    • You can whitelist a list of IPs too. Enter them as comma separated list.
    • Delta support both IPv4 and IPv6 formats for whitelisting.

    2. Consider Network Behavior

    • VPNs or ISPs with dynamic IPs may require frequent updates.
    • Consider cloud hosted machine with static IP for production to avoid whitelisting repeatedly.

    Request Forbidden Error

    • { "error": "Forbidden", "message": "Request blocked by CDN" }

    Explanation: Your request was blocked before reaching the Delta API gateway. This usually happens when required headers are missing (e.g., User-Agent), or when requests originate from environments where the IP is hidden or blocked by the CDN.

    πŸ”§ Troubleshooting

    1. Add a User-Agent Manually

    • Some HTTP clients (e.g., in certain programming languages) do not send a User-Agent header by default.
    • Set a valid User-Agent string in your request to avoid being rejected.

    2. Trace Request Headers

    • Inspect the request/response headers using tools like curl -v, Postman, or your language’s HTTP client debugger.
    • Check if required headers are present and correctly passed through.

    3. Verify Request IP

    • Some hosted environments or proxies mask the client IP.
    • Confirm that the request includes a valid IP address visible to the CDN. If the IP is hidden or blocked, the request will be rejected.

    Signature Mismatch Error

    • { "success": false, "error": { "code": "Signature Mismatch" } }

    Explanation: This error occurs when the signature generated on your end does not match the one received by Delta Exchange. This can happen due to incorrect timestamp, payload, or method used in the signature generation.

    πŸ”§ Troubleshooting

    1. Verify Signature Generation

    • Ensure you are using the correct http method (GET/POST) and the same payload as in the request.
    • Check that the timestamp used in the signature matches the one sent in the request.
    • Ensure you are using the correct API secret for the signature generation.
    • Make sure you are using the correct endpoint path and query parameters in the signature generation.
    • Ensure that the payload is properly formatted and matches the request body.
    • Check for any extra spaces or characters in the signature string.
    • Refer to the sample code block (see Signing a Message).

    By following these troubleshooting steps, you can resolve common Delta Exchange API authentication and authorization issues. For persistent problems, contact Delta Exchange support.

    (Note - api key creation blocked - When user enters wrong otp/mfa code more than 5 times, Delta exchange blocks api key creation for next 30 mins. After then, users can try creating again.)

    Generating an API Key

    Before being able to sign any requests, you must create an API key via the Delta website. Upon creating a key you will receive api key and api secret, which you must remember and secure at your end. The Key and Secret will be randomly generated.

    You can create a new API key from here : https://www.delta.exchange/app/account/manageapikeys

    To create an API key with Trading permissions, whitelisted IP(s) must be provided. API requests using this API key will only succeed, if made from a machine with an IP address that was whitelisted. Multiple IPs can be whitelisted for a single API key. IP values can take IPv4 and IPv6. Whitelisted IPs can be changed and updated from the same page.

    Only IP addresses located in India can be whitelisted. This applies to both Trading and Read-only keys. Institutional accounts can whitelist non-Indian IPs after confirming, on the API key page, that these IPs serve Indian users only.

    Common issues:
    1. Your machine is using IPv6 instead of IPv4 or vice-versa. Disable the one that isn’t whitelisted from your network settings or whitelist both.
    2. Your ISP may automatically change the IP address at your home, office about once a week. Update your whitelisted IP in such case.
    3. If you are using a Web Service/Cloud provider like AWS, assign a static public IPv4 address to your machine.

    API Key Permissions

    You can restrict the functionality of API keys. Before creating the key, you must choose what permissions you would like the key to have. The permissions are:

    • Trading - Allow a key to have trading permissions. This includes placing new orders, cancelling orders, closing positions, changing margin & leverage.

    Creating a Request

    All Authenticated requests must contain the following headers:

    api-key: The api key as a string.

    signature: The hex-encoded signature (see Signing a Message).

    timestamp: A timestamp for your request.

    User-Agent: Your programming language or library that you are using. e.g. "python-3.10" or "java". This is for our internal stats, this header must be sent to avoid 4XX error.

    All request bodies should have content type application/json and be valid JSON.

    Signing a Message

    The signature header is generated by creating a sha256 HMAC using the secret key on the prehash string method + timestamp + requestPath + query params + body (where + represents string concatenation) and convert output to hexdigest. The timestamp value is the same as the 'timestamp' header.

    Signature created in the last 5 seconds is allowed. if signature reaches delta system post 5 seconds of generation, then it will fail.

    Code samples

    
    # GET /orders
    # queryString: product_id=1&state=open
    
    # Generating signature:
    echo -n "GET1542110948/v2/orders?product_id=1&state=open" | openssl dgst -sha256 -hmac "7b6f39dcf660ec1c7c664f612c60410a2bd0c258416b498bf0311f94228f"
    
    # Sample Request:
    # Url:
    #  /v2/orders?product_id=1&state=open
    # Headers:
    #  signature: ad767fead0bdbe91ba1e4feb142079245fecd66aa5e47a70b40ba1a4c9b4e3db
    #  api-key: a207900b7693435a8fa9230a38195d
      #timestamp: 1542110948
    
    
    import hashlib
    import hmac
    import requests
    import time
    
    base_url = 'https://api.india.delta.exchange'
    api_key = 'a207900b7693435a8fa9230a38195d'
    api_secret = '7b6f39dcf660ec1c7c664f612c60410a2bd0c258416b498bf0311f94228f'
    
    def generate_signature(secret, message):
        message = bytes(message, 'utf-8')
        secret = bytes(secret, 'utf-8')
        hash = hmac.new(secret, message, hashlib.sha256)
        return hash.hexdigest()
    
    # Get open orders
    method = 'GET'
    timestamp = str(int(time.time()))
    path = '/v2/orders'
    url = f'{base_url}{path}'
    query_string = '?product_id=1&state=open'
    payload = ''
    signature_data = method + timestamp + path + query_string + payload
    signature = generate_signature(api_secret, signature_data)
    
    req_headers = {
      'api-key': api_key,
      'timestamp': timestamp,
      'signature': signature,
      'User-Agent': 'python-rest-client',
      'Content-Type': 'application/json'
    }
    
    query = {"product_id": 1, "state": 'open'}
    
    response = requests.request(
        method, url, data=payload, params=query, timeout=(3, 27), headers=req_headers
    )
    
    # Place new order
    method = 'POST'
    timestamp = str(int(time.time()))
    path = '/v2/orders'
    url = f'{base_url}{path}'
    query_string = ''
    payload = "{\"order_type\":\"limit_order\",\"size\":3,\"side\":\"buy\",\"limit_price\":\"0.0005\",\"product_id\":16}"
    signature_data = method + timestamp + path + query_string + payload
    signature = generate_signature(api_secret, signature_data)
    
    req_headers = {
      'api-key': api_key,
      'timestamp': timestamp,
      'signature': signature,
      'User-Agent': 'rest-client',
      'Content-Type': 'application/json'
    }
    
    response = requests.request(
        method, url, data=payload, params={}, timeout=(3, 27), headers=req_headers
    )
    
    

    Rate Limits

    When a rate limit is exceeded, a HTTP response status 429 Too Many Requests will be returned. 'X-RATE-LIMIT-RESET' is returned in response header with time left in milliseconds after which next API request can be hit.

    We throttle unauthenticated api requests by IP address and authenticated requests by user ID.

    Default Quota is 20000 for a fixed 5 minute window. Rate Limit quota resets to full every 5 mins.

    API & product rate limits

    REST API

    Every REST endpoint has been assigned a weight. When you make an API call, the weight of that endpoint is deducted from your 5 min window quota. Exceeding the rate limit quota, results in 429 HTTP response status error. API endpoints related to reading public data are lighter in weight, whereas API endpoints related to writing private data (like placing an order) are heavier in weight.

    Here is the cost structure for various endpoints. Please note that any endpoint not mentioned here has a cost of 1 unit.

    Weight Slab API Endpoints
    3 Get Products, Get Orderbook, Get Tickers, Get Open Orders, Get Open Postions, Get Balances, OHLC Candles
    5 Place/Edit/Delete Order, Add Position Margin
    10 Get Order History, Get Fills, Get Txn Logs
    25 Batch Order Apis

    e.g. Consider making all the below requests in a 5 minute window.
    100 Get Open Orders requests = 100 * 3 = 300 weight.
    50 Get Balances requests = 50 * 3 = 150 weight.
    200 Place order requests = 200 * 5 = 1000 weight.
    20 Batch Order requests = 20 * 25 = 500 weight.
    Total quota used: 300 + 150 + 1000 + 500 = 1950 quota used. If this is greater than quota assigned to you, rate limit error will occur.

    Product

    We have also introduced rate limits to manage operations within the matching engine. The current rate limit is set at 500 operations per second for each product. For example, placing 50 orders in a batch counts as 50 operations, as each individual order will be processed by the matching engine.

    This measure is in place to prevent excessive operations on the matching engine, which could slow down its performance.

    Even if you have not exceeded the rate limit on the REST API level, your requests may still fail with a 429 error if you breach the product-level rate limit.

    Increasing your rate limits

    If you are running up against our limits and believe that you have a legitimate need, please email us at [email protected] to discuss increasing your rate limits.

    System Status

    This is a public websocket channel that provides updates on system-wide status events such as scheduled maintenance, maintenance start and finish, degraded mode, and fallback operation. No symbols are required when subscribing to this channel. For more details, click on System Status to be redirected to the maintenance page (see System Status).

    Types

    Timestamps

    Unless otherwise specified, all timestamps from API are returned in ISO 8601 with microseconds. Make sure you can parse the following ISO 8601 format. Most modern languages and libraries will handle this without issues.

    2019-09-18T10:41:20Z
    
    

    Numbers

    Big Decimal numbers are returned as strings to save full precision. When making a API request, it is suggested to convert numbers to strings to avoid truncation and precision errors.

    e.g. Limit price, stop loss price, trail_amount

    Integer numbers (like contract size, product_id and impact size) are unquoted.

    IDs

    Most identifiers are big integers unless otherwise specified. When making a request that requires an ID, ensure it is passed as a numeric value without formatting changes. When making a request which requires a UUID, both forms (with and without dashes) are accepted.

    167ja7cg-678e-6876-d6g3-f803ce49qsc9 or 167ja7cg678e6876d6g3f803ce49qsc9

    Response Formats

    To ensure that you are effectively using the api, we encourage you to go through this section.

    1. All responses coming from the server, either from rest api or socket rpc calls will have the following success and error formats.
    2. All timestamps reported in the apis will be in microseconds
    3. All big decimal values are sent as string
    // The new format supports sending meta data alongside response body. 
    // Success format
    {
      "success": true,
      "result": {},         // response body
      "meta": {
        "after": "...",       // cursor for pagination, is returned in meta
        "before": null,
      },
    }
    
    // Error Format
    {
      "success": false,
      "error": {
        "code": "insufficient_margin",             // error code
        "context": {                              // error context
          "additional_margin_required": "0.121"
        }
      }
    }
    

    Spot Trading

    Delta Exchange also offers Spot markets, where supported cryptocurrencies are traded directly against INR.

    Spot uses the same REST endpoints, WebSocket channels, and authentication as the rest of the API. There are no separate Spot endpoints and no additional auth requirements β€” to trade Spot, point an existing call at a Spot product.

    Asset Symbol
    Bitcoin BTC_INR
    Ethereum ETH_INR
    Solana SOL_INR
    XRP XRP_INR

    New markets are added over time. Fetch the current list from /v2/products:

    curl -X GET "https://api.india.delta.exchange/v2/products?contract_types=spot&states=live" -H "Accept: application/json"

    MCP Server

    // Claude Desktop / Claude Code / Cursor / VS Code
    {
      "mcpServers": {
        "delta-exchange": {
          "command": "uvx",
          "args": ["delta-exchange-mcp"],
          "env": {
            "DELTA_API_KEY": "your_api_key",
            "DELTA_API_SECRET": "your_api_secret"
          }
        }
      }
    }
    

    The Delta Exchange MCP server exposes this API to AI agents over the Model Context Protocol. It runs as a local stdio subprocess and turns agent tool calls into signed REST requests. An agent reads market data, checks an account and places orders without writing HTTP or signing code.

    Install and run it with uvx delta-exchange-mcp. Its tools fall into three tiers:

    Category API key Permissions What an agent can do
    Market data Not required β€” Read the product catalog, tickers, order-book depth, recent trades and OHLC candles. Pull option chains, spot indices, settlement prices, and funding-rate, mark-price and open-interest history.
    Account data Required Read permission Read open positions with size, entry and unrealized PnL. Read balances, the wallet ledger, active and past orders, own fills, leverage and account preferences. Export fills to CSV.
    Trading Required Trading permission + DELTA_MCP_MODE=trade Place, edit and cancel single orders, batches of up to 50 on one contract, and take-profit/stop-loss brackets. Set leverage, adjust isolated margin, close all positions.

    Every tool is a read-only GET by default. The trading tools register only when you set DELTA_MCP_MODE=trade and supply an API key with trading permissions.

    Once connected, ask the agent in plain language:

    • "What is my unrealized PnL on BTCUSD?"
    • "Show the BTC option chain expiring this Friday."
    • "Cancel my open orders on ETHUSD." (trade mode only)

    For setup, the full tool reference and key permissions, see mcp.delta.exchange/docs.

    Rest Api

    This section documents the latest(v2) api for trading on Delta Exchange. The REST API has endpoints for account and order management as well as public market data.

    If you are looking for the old api documentation, here is the link to v1 api docs (now deprecated).

    REST API Endpoint URL for Delta Exchange

    • Production - https://api.india.delta.exchange
    • Testnet(Demo Account) - https://cdn-ind.testnet.deltaex.org

    Assets

    Get Asset List

    Get list of all assets

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/assets', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/assets \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/assets',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /assets

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": 14,
          "symbol": "USD",
          "precision": 8,
          "deposit_status": "enabled",
          "withdrawal_status": "enabled",
          "base_withdrawal_fee": "0.000000000000000000",
          "min_withdrawal_amount": "0.000000000000000000",
          "name": "US Dollar",
          "networks": [
            {}
          ],
          "interest_credit": false,
          "interest_slabs": null,
          "kyc_deposit_limit": "0.000000000000000000",
          "kyc_withdrawal_limit": "0.000000000000000000",
          "minimum_precision": 2,
          "sort_priority": null,
          "variable_withdrawal_fee": "0.000000000000000000"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of Asset schema Inline

    Response Schema

    Enumerated Values

    Property Value Description
    deposit_status enabled Deposits are currently allowed for the asset
    deposit_status disabled Deposits are currently not allowed for the asset
    withdrawal_status enabled Withdrawals are currently allowed for the asset
    withdrawal_status disabled Withdrawals are currently not allowed for the asset
    This operation does not require authentication.

    Indices

    Get Indices List

    Get indices

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/indices', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/indices \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/indices',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /indices

    Indices refer to spot price indices that Delta Exchange creates by combining spot prices of prominent crypto exchanges. These indices form the underlying of futures and options contracts listed on Delta Exchange. All details of indices on Delta Exchange are available here.

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": 14,
          "symbol": ".DEXBTUSD",
          "constituent_exchanges": [
            {
              "name": "ExchangeA",
              "weight": 0.25
            }
          ],
          "underlying_asset_id": 13,
          "quoting_asset_id": 14,
          "tick_size": "0.5",
          "index_type": "spot_pair",
          "config": {
            "price_alert_enabled": true,
            "quoting_asset": "string",
            "service_id": 0,
            "underlying_asset": "string"
          },
          "description": "string",
          "impact_size": "string",
          "constituent_indices": {
            "expression": "string",
            "indices": {}
          },
          "health_interval": 0,
          "is_composite": true,
          "price_method": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of Spot Index schema Inline

    Response Schema

    Enumerated Values

    Property Value Description
    index_type spot_pair Index based on a spot trading pair
    index_type fixed_interest_rate Index based on a fixed interest rate
    index_type floating_interest_rate Index based on a floating interest rate
    This operation does not require authentication.

    Products

    Get Product List

    Get list of products

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/products', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/products \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/products',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /products

    The endpoint provides details about all available trading products on the platform. Each product represents a financial instrument like perpetual futures, options, or contracts for specific asset pairs.

    Parameters

    Parameter In Type Required Description
    contract_types query string false Comma separated list of contract types e.g. perpetual_futures,call_options, put_options
    states query string false Comma separated list of states e.g. upcoming,live,expired,settled to get expired contracts.
    after query string false after cursor for paginated request
    before query string false before cursor for paginated request
    page_size query string false size of a single page for paginated request, default: 100
    expiry query string false Expiry date in YYYY-MM-DD format to filter products by current & future expiry date.

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": 27,
          "symbol": "BTCUSD",
          "description": "Bitcoin Perpetual futures, quoted, settled & margined in USD",
          "created_at": "2023-12-18T13:10:39Z",
          "updated_at": "2024-11-15T02:47:50Z",
          "settlement_time": null,
          "notional_type": "vanilla",
          "impact_size": 10000,
          "initial_margin": "0.5",
          "maintenance_margin": "0.25",
          "contract_value": "0.001",
          "contract_unit_currency": "BTC",
          "tick_size": "0.5",
          "product_specs": {
            "funding_clamp_value": 0.05,
            "only_reduce_only_orders_allowed": false,
            "expiry_interval": 28800,
            "isolated_liq_penalty_factor": 0.01,
            "rate_exchange_interval": 28800,
            "tags": [
              "layer_1"
            ],
            "vol_expiry_time": 172800,
            "backup_vol_expiry_time": 31536000,
            "max_deviation_from_external_vol": 0.75,
            "max_lower_deviation_from_external_vol": 0.75,
            "max_upper_deviation_from_external_vol": 0.5,
            "max_volatility": 3,
            "min_volatility": 0.1,
            "premium_commission_rate": 0.1,
            "vol_calculation_method": "orderbook"
          },
          "state": "live",
          "trading_status": "operational",
          "max_leverage_notional": "100000",
          "default_leverage": "200",
          "initial_margin_scaling_factor": "0.0000025",
          "maintenance_margin_scaling_factor": "0.00000125",
          "taker_commission_rate": "0.0005",
          "maker_commission_rate": "0.0002",
          "liquidation_penalty_factor": "0.5",
          "contract_type": "perpetual_futures",
          "position_size_limit": 229167,
          "basis_factor_max_limit": "10.95",
          "is_quanto": false,
          "funding_method": "mark_price",
          "annualized_funding": "10.95",
          "price_band": "2.5",
          "underlying_asset": {
            "id": 14,
            "symbol": "USD",
            "precision": 8,
            "deposit_status": "enabled",
            "withdrawal_status": "enabled",
            "base_withdrawal_fee": "0.000000000000000000",
            "min_withdrawal_amount": "0.000000000000000000",
            "name": "US Dollar",
            "networks": [
              {}
            ],
            "interest_credit": false,
            "interest_slabs": null,
            "kyc_deposit_limit": "0.000000000000000000",
            "kyc_withdrawal_limit": "0.000000000000000000",
            "minimum_precision": 2,
            "sort_priority": null,
            "variable_withdrawal_fee": "0.000000000000000000"
          },
          "quoting_asset": {
            "id": 14,
            "symbol": "USD",
            "precision": 8,
            "deposit_status": "enabled",
            "withdrawal_status": "enabled",
            "base_withdrawal_fee": "0.000000000000000000",
            "min_withdrawal_amount": "0.000000000000000000",
            "name": "US Dollar",
            "networks": [
              {}
            ],
            "interest_credit": false,
            "interest_slabs": null,
            "kyc_deposit_limit": "0.000000000000000000",
            "kyc_withdrawal_limit": "0.000000000000000000",
            "minimum_precision": 2,
            "sort_priority": null,
            "variable_withdrawal_fee": "0.000000000000000000"
          },
          "settling_asset": {
            "id": 14,
            "symbol": "USD",
            "precision": 8,
            "deposit_status": "enabled",
            "withdrawal_status": "enabled",
            "base_withdrawal_fee": "0.000000000000000000",
            "min_withdrawal_amount": "0.000000000000000000",
            "name": "US Dollar",
            "networks": [
              {}
            ],
            "interest_credit": false,
            "interest_slabs": null,
            "kyc_deposit_limit": "0.000000000000000000",
            "kyc_withdrawal_limit": "0.000000000000000000",
            "minimum_precision": 2,
            "sort_priority": null,
            "variable_withdrawal_fee": "0.000000000000000000"
          },
          "spot_index": {
            "id": 14,
            "symbol": ".DEXBTUSD",
            "constituent_exchanges": [
              {
                "name": "ExchangeA",
                "weight": 0.25
              }
            ],
            "underlying_asset_id": 13,
            "quoting_asset_id": 14,
            "tick_size": "0.5",
            "index_type": "spot_pair",
            "config": {
              "price_alert_enabled": true,
              "quoting_asset": "string",
              "service_id": 0,
              "underlying_asset": "string"
            },
            "description": "string",
            "impact_size": "string",
            "constituent_indices": {
              "expression": "string",
              "indices": {}
            },
            "health_interval": 0,
            "is_composite": true,
            "price_method": "string"
          },
          "disruption_reason": null,
          "impact_notional": "10000",
          "position_notional_limit": null,
          "auction_start_time": "2026-08-13T05:51:51Z",
          "settlement_price": null,
          "auction_finish_time": null,
          "strike_price": "63600",
          "short_description": "BTC  Call",
          "ui_config": {
            "default_trading_view_candle": "60",
            "leverage_slider_values": [
              0
            ],
            "price_clubbing_values": [
              0
            ],
            "show_bracket_orders": true,
            "sort_priority": 0,
            "tags": [
              "string"
            ]
          },
          "launch_time": "2020-04-20T08:37:05Z",
          "insurance_fund_margin_contribution": "5",
          "barrier_price": null
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of Products Inline

    Response Schema

    Enumerated Values

    Property Value Description
    notional_type vanilla Contract is quoted, settled, and margined in the quote currency
    notional_type inverse Contract is quoted in the quote currency but settled and margined in the base currency
    state live Product is currently active and tradable
    state expired Product has expired and is no longer tradable
    state upcoming Product is scheduled to go live in the future
    trading_status operational Trading is fully operational; orders can be placed and cancelled
    trading_status disrupted_cancel_only Trading is disrupted; only order cancellations are allowed
    trading_status disrupted_post_only Trading is disrupted; only post-only orders are accepted
    deposit_status enabled Deposits are currently allowed for the asset
    deposit_status disabled Deposits are currently not allowed for the asset
    withdrawal_status enabled Withdrawals are currently allowed for the asset
    withdrawal_status disabled Withdrawals are currently not allowed for the asset
    index_type spot_pair Index based on a spot trading pair
    index_type fixed_interest_rate Index based on a fixed interest rate
    index_type floating_interest_rate Index based on a floating interest rate
    This operation does not require authentication.

    Get product by symbol

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/products/{symbol}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/products/{symbol} \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/products/{symbol}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /products/{symbol}

    The endpoint retrieves details of a specific product identified by its symbol (e.g., BTCUSD, ETHUSD).

    Parameters

    Parameter In Type Required Description
    symbol path string true symbol of the desired product like BTCUSD, ETHUSD

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "id": 27,
        "symbol": "BTCUSD",
        "description": "Bitcoin Perpetual futures, quoted, settled & margined in USD",
        "created_at": "2023-12-18T13:10:39Z",
        "updated_at": "2024-11-15T02:47:50Z",
        "settlement_time": null,
        "notional_type": "vanilla",
        "impact_size": 10000,
        "initial_margin": "0.5",
        "maintenance_margin": "0.25",
        "contract_value": "0.001",
        "contract_unit_currency": "BTC",
        "tick_size": "0.5",
        "product_specs": {
          "funding_clamp_value": 0.05,
          "only_reduce_only_orders_allowed": false,
          "expiry_interval": 28800,
          "isolated_liq_penalty_factor": 0.01,
          "rate_exchange_interval": 28800,
          "tags": [
            "layer_1"
          ],
          "vol_expiry_time": 172800,
          "backup_vol_expiry_time": 31536000,
          "max_deviation_from_external_vol": 0.75,
          "max_lower_deviation_from_external_vol": 0.75,
          "max_upper_deviation_from_external_vol": 0.5,
          "max_volatility": 3,
          "min_volatility": 0.1,
          "premium_commission_rate": 0.1,
          "vol_calculation_method": "orderbook"
        },
        "state": "live",
        "trading_status": "operational",
        "max_leverage_notional": "100000",
        "default_leverage": "200",
        "initial_margin_scaling_factor": "0.0000025",
        "maintenance_margin_scaling_factor": "0.00000125",
        "taker_commission_rate": "0.0005",
        "maker_commission_rate": "0.0002",
        "liquidation_penalty_factor": "0.5",
        "contract_type": "perpetual_futures",
        "position_size_limit": 229167,
        "basis_factor_max_limit": "10.95",
        "is_quanto": false,
        "funding_method": "mark_price",
        "annualized_funding": "10.95",
        "price_band": "2.5",
        "underlying_asset": {
          "id": 14,
          "symbol": "USD",
          "precision": 8,
          "deposit_status": "enabled",
          "withdrawal_status": "enabled",
          "base_withdrawal_fee": "0.000000000000000000",
          "min_withdrawal_amount": "0.000000000000000000",
          "name": "US Dollar",
          "networks": [
            {}
          ],
          "interest_credit": false,
          "interest_slabs": null,
          "kyc_deposit_limit": "0.000000000000000000",
          "kyc_withdrawal_limit": "0.000000000000000000",
          "minimum_precision": 2,
          "sort_priority": null,
          "variable_withdrawal_fee": "0.000000000000000000"
        },
        "quoting_asset": {
          "id": 14,
          "symbol": "USD",
          "precision": 8,
          "deposit_status": "enabled",
          "withdrawal_status": "enabled",
          "base_withdrawal_fee": "0.000000000000000000",
          "min_withdrawal_amount": "0.000000000000000000",
          "name": "US Dollar",
          "networks": [
            {}
          ],
          "interest_credit": false,
          "interest_slabs": null,
          "kyc_deposit_limit": "0.000000000000000000",
          "kyc_withdrawal_limit": "0.000000000000000000",
          "minimum_precision": 2,
          "sort_priority": null,
          "variable_withdrawal_fee": "0.000000000000000000"
        },
        "settling_asset": {
          "id": 14,
          "symbol": "USD",
          "precision": 8,
          "deposit_status": "enabled",
          "withdrawal_status": "enabled",
          "base_withdrawal_fee": "0.000000000000000000",
          "min_withdrawal_amount": "0.000000000000000000",
          "name": "US Dollar",
          "networks": [
            {}
          ],
          "interest_credit": false,
          "interest_slabs": null,
          "kyc_deposit_limit": "0.000000000000000000",
          "kyc_withdrawal_limit": "0.000000000000000000",
          "minimum_precision": 2,
          "sort_priority": null,
          "variable_withdrawal_fee": "0.000000000000000000"
        },
        "spot_index": {
          "id": 14,
          "symbol": ".DEXBTUSD",
          "constituent_exchanges": [
            {
              "name": "ExchangeA",
              "weight": 0.25
            }
          ],
          "underlying_asset_id": 13,
          "quoting_asset_id": 14,
          "tick_size": "0.5",
          "index_type": "spot_pair",
          "config": {
            "price_alert_enabled": true,
            "quoting_asset": "string",
            "service_id": 0,
            "underlying_asset": "string"
          },
          "description": "string",
          "impact_size": "string",
          "constituent_indices": {
            "expression": "string",
            "indices": {}
          },
          "health_interval": 0,
          "is_composite": true,
          "price_method": "string"
        },
        "disruption_reason": null,
        "impact_notional": "10000",
        "position_notional_limit": null,
        "auction_start_time": "2026-08-13T05:51:51Z",
        "settlement_price": null,
        "auction_finish_time": null,
        "strike_price": "63600",
        "short_description": "BTC  Call",
        "ui_config": {
          "default_trading_view_candle": "60",
          "leverage_slider_values": [
            0
          ],
          "price_clubbing_values": [
            0
          ],
          "show_bracket_orders": true,
          "sort_priority": 0,
          "tags": [
            "string"
          ]
        },
        "launch_time": "2020-04-20T08:37:05Z",
        "insurance_fund_margin_contribution": "5",
        "barrier_price": null
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Product Inline

    Response Schema

    Enumerated Values

    Property Value Description
    notional_type vanilla Contract is quoted, settled, and margined in the quote currency
    notional_type inverse Contract is quoted in the quote currency but settled and margined in the base currency
    state live Product is currently active and tradable
    state expired Product has expired and is no longer tradable
    state upcoming Product is scheduled to go live in the future
    trading_status operational Trading is fully operational; orders can be placed and cancelled
    trading_status disrupted_cancel_only Trading is disrupted; only order cancellations are allowed
    trading_status disrupted_post_only Trading is disrupted; only post-only orders are accepted
    deposit_status enabled Deposits are currently allowed for the asset
    deposit_status disabled Deposits are currently not allowed for the asset
    withdrawal_status enabled Withdrawals are currently allowed for the asset
    withdrawal_status disabled Withdrawals are currently not allowed for the asset
    index_type spot_pair Index based on a spot trading pair
    index_type fixed_interest_rate Index based on a fixed interest rate
    index_type floating_interest_rate Index based on a floating interest rate
    This operation does not require authentication.

    Get tickers for products

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/tickers', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/tickers \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/tickers',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /tickers

    This endpoint retrieves the live tickers for available trading products, with an optional filter by specified contract types. The contract types should be provided as a comma-separated list (e.g., futures, perpetual_futures, call_options). If no contract type is specified, data for all available products will be returned.

    Parameters

    Parameter In Type Required Description
    contract_types query string false A comma-separated list of contract types to filter the tickers. Example values include perpetual_futures, call_options, put_options.
    underlying_asset_symbols query string false A comma-separated list of underlying asset symbols to filter the tickers. Example values include BTC, ETH, SOL etc.
    expiry_date query string false Expiry date(format: DD-MM-YYYY) to filter the tickers.

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "close": 67321,
          "contract_type": "futures",
          "greeks": {
            "delta": "0.25",
            "gamma": "0.10",
            "rho": "0.05",
            "theta": "-0.02",
            "vega": "0.15"
          },
          "high": 68500.5,
          "low": 66300.25,
          "ltp_change_24h": "0.7061",
          "mark_price": "67000.00",
          "mark_vol": "500",
          "oi": "15000",
          "oi_value": "1000000",
          "oi_value_symbol": "USD",
          "oi_value_usd": "1050000",
          "open": 67000,
          "price_band": {
            "lower_limit": "61120.45",
            "upper_limit": "72300.00"
          },
          "product_id": 123456,
          "quotes": {
            "ask_iv": "0.25",
            "ask_size": "100",
            "best_ask": "150.00",
            "best_bid": "148.00",
            "bid_iv": "0.22",
            "bid_size": "50"
          },
          "size": 100,
          "spot_price": "67000.00",
          "strike_price": "68000.00",
          "symbol": "BTCUSD",
          "timestamp": 1609459200,
          "turnover": 5000000,
          "turnover_symbol": "USD",
          "turnover_usd": 5200000,
          "volume": 25000
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of live tickers for all products, including implied volatility (IV) for option strikes. Inline

    Response Schema

    This operation does not require authentication.

    Get ticker for a product by symbol

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/tickers/{symbol}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/tickers/{symbol} \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/tickers/{symbol}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /tickers/{symbol}

    This endpoint retrieves the ticker data for a specific product, identified by its symbol. The ticker data includes live price data, open interest, implied volatility (IV) for options, and other related market data.

    Parameters

    Parameter In Type Required Description
    symbol path string true The symbol(s) of the product, comma-separated. Maximum 10 symbols allowed. Example: (e.g., BTCUSD, ETHUSD).

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "close": 67321,
        "contract_type": "futures",
        "greeks": {
          "delta": "0.25",
          "gamma": "0.10",
          "rho": "0.05",
          "theta": "-0.02",
          "vega": "0.15"
        },
        "high": 68500.5,
        "low": 66300.25,
        "ltp_change_24h": "0.7061",
        "mark_price": "67000.00",
        "mark_vol": "500",
        "oi": "15000",
        "oi_value": "1000000",
        "oi_value_symbol": "USD",
        "oi_value_usd": "1050000",
        "open": 67000,
        "price_band": {
          "lower_limit": "61120.45",
          "upper_limit": "72300.00"
        },
        "product_id": 123456,
        "quotes": {
          "ask_iv": "0.25",
          "ask_size": "100",
          "best_ask": "150.00",
          "best_bid": "148.00",
          "bid_iv": "0.22",
          "bid_size": "50"
        },
        "size": 100,
        "spot_price": "67000.00",
        "strike_price": "68000.00",
        "symbol": "BTCUSD",
        "timestamp": 1609459200,
        "turnover": 5000000,
        "turnover_symbol": "USD",
        "turnover_usd": 5200000,
        "volume": 25000
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Ticker data for the requested product, including implied volatility (IV) for option strikes, if applicable. Inline

    Response Schema

    This operation does not require authentication.

    Get option chain

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/tickers?contract_types=call_options,put_options&underlying_asset_symbols={underlying_asset_symbols}&expiry_date={expiry_date}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/tickers?contract_types=call_options,put_options&underlying_asset_symbols={underlying_asset_symbols}&expiry_date={expiry_date} \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/tickers?contract_types=call_options,put_options&underlying_asset_symbols={underlying_asset_symbols}&expiry_date={expiry_date}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /tickers?contract_types=call_options,put_options&underlying_asset_symbols={underlying_asset_symbols}&expiry_date={expiry_date}

    Fetch option chain data for a given product and expiry date.

    For example, to get BTC call and put options expiring on 04-04-2025, use:

    contract_types=call_options,put_options&underlying_asset_symbols=BTC&expiry_date=04-04-2025

    Parameters

    Parameter In Type Required Description
    contract_types query string false A comma-separated list of contract types to filter the products. Only call_options and put_options are supported.
    underlying_asset_symbols query string false The underlying asset symbol (single value) for the option chain. Examples: BTC, ETH, SOL.
    expiry_date query string false Expiry date of the contracts in DD-MM-YYYY format to filter by current & future expiry date.

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "close": 67321,
          "contract_type": "futures",
          "greeks": {
            "delta": "0.25",
            "gamma": "0.10",
            "rho": "0.05",
            "theta": "-0.02",
            "vega": "0.15"
          },
          "high": 68500.5,
          "low": 66300.25,
          "ltp_change_24h": "0.7061",
          "mark_price": "67000.00",
          "mark_vol": "500",
          "oi": "15000",
          "oi_value": "1000000",
          "oi_value_symbol": "USD",
          "oi_value_usd": "1050000",
          "open": 67000,
          "price_band": {
            "lower_limit": "61120.45",
            "upper_limit": "72300.00"
          },
          "product_id": 123456,
          "quotes": {
            "ask_iv": "0.25",
            "ask_size": "100",
            "best_ask": "150.00",
            "best_bid": "148.00",
            "bid_iv": "0.22",
            "bid_size": "50"
          },
          "size": 100,
          "spot_price": "67000.00",
          "strike_price": "68000.00",
          "symbol": "BTCUSD",
          "timestamp": 1609459200,
          "turnover": 5000000,
          "turnover_symbol": "USD",
          "turnover_usd": 5200000,
          "volume": 25000
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns a list of live tickers for all products, including implied volatility (IV) for option strikes. Inline

    Response Schema

    This operation does not require authentication.

    Orders

    Placing Orders, Cancelling Orders, Placing batch orders, Cancelling batch orders, Get Open orders, Change Orders Leverage. Rate limits have been introduced recently that allows only set number of operations inside a matching engine in a timeframe. The current rate limits is 500 operations/sec for each product. For ex - placing 50 orders in a batch is equivalent to 50 operations as these orders will be processed by matching engine. Rate limits do not apply when cancelling orders.

    Place Order

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.post('https://api.india.delta.exchange/v2/orders', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X POST https://api.india.delta.exchange/v2/orders \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.post 'https://api.india.delta.exchange/v2/orders',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    POST /orders

    Body parameter

    {
      "product_id": 27,
      "product_symbol": "BTCUSD",
      "limit_price": "59000",
      "size": 10,
      "side": "buy",
      "order_type": "limit_order",
      "stop_order_type": "stop_loss_order",
      "stop_price": "56000",
      "trail_amount": "50",
      "stop_trigger_method": "last_traded_price",
      "bracket_stop_trigger_method": "last_traded_price",
      "bracket_stop_loss_limit_price": "57000",
      "bracket_stop_loss_price": "56000",
      "bracket_trail_amount": "50",
      "bracket_take_profit_limit_price": "62000",
      "bracket_take_profit_price": "61000",
      "time_in_force": "gtc",
      "mmp": "disabled",
      "post_only": false,
      "reduce_only": false,
      "client_order_id": "my_signal_345212",
      "cancel_orders_accepted": false
    }
    

    Parameters

    Parameter In Type Required Description
    body body CreateOrderRequest true Order which needs to be created. Rate limits apply.

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "id": 123,
        "user_id": 453671,
        "size": 10,
        "unfilled_size": 2,
        "side": "buy",
        "order_type": "limit_order",
        "limit_price": "59000",
        "stop_order_type": "stop_loss_order",
        "stop_price": "55000",
        "average_fill_price": "8999.00",
        "bracket_order": false,
        "bracket_stop_loss_price": "56000",
        "bracket_stop_loss_limit_price": "57000",
        "bracket_take_profit_price": "61000",
        "bracket_take_profit_limit_price": "62000",
        "bracket_trail_amount": "50",
        "trail_amount": "50",
        "cancellation_reason": "cancelled_by_user",
        "mmp": "disabled",
        "stop_trigger_method": "last_traded_price",
        "time_in_force": "gtc",
        "updated_at": "1725865012000000",
        "paid_commission": "0.5432",
        "commission": "0.5432",
        "reduce_only": false,
        "client_order_id": "my_signal_34521712",
        "state": "open",
        "created_at": "1725865012000000",
        "product_id": 27,
        "product_symbol": "BTCUSD"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns back the order object with assigned id and latest state Inline
    400 Bad Request Returns error if order could not be placed ApiErrorResponse

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Buy order on the product
    side sell Sell order on the product
    order_type limit_order Order placed at a specified limit price
    order_type market_order Order executed at the best available market price
    stop_order_type stop_loss_order Order triggered when stop price is hit to limit losses
    stop_order_type take_profit_order Order triggered when take profit price is hit to lock in gains
    stop_order_type liquidation_order Order automatically generated by the system to close a position during liquidation
    mmp disabled
    mmp mmp1
    mmp mmp2
    mmp mmp3
    mmp mmp4
    mmp mmp5
    stop_trigger_method mark_price Order triggered against the mark price
    stop_trigger_method last_traded_price Order triggered against the last traded price
    stop_trigger_method spot_price Order triggered against the spot index price
    time_in_force gtc Good-till-cancelled; order stays open until filled or cancelled
    time_in_force ioc Immediate-or-cancel; unfilled portion is cancelled immediately
    reduce_only false Order can open or increase a position
    reduce_only true Order can only reduce or close an existing position
    state open Order is active and resting in the orderbook
    state pending Order is waiting for its trigger condition to be met
    state closed Order has been fully filled
    state cancelled Order was cancelled before being fully filled
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Cancel Order

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.delete('https://api.india.delta.exchange/v2/orders', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X DELETE https://api.india.delta.exchange/v2/orders \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.delete 'https://api.india.delta.exchange/v2/orders',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    DELETE /orders

    Body parameter

    {
      "id": 13452112,
      "client_order_id": "my_signal_34521712",
      "product_id": 27
    }
    

    Parameters

    Parameter In Type Required Description
    body body DeleteOrderRequest true Order which needs to be cancelled

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "id": 123,
        "user_id": 453671,
        "size": 10,
        "unfilled_size": 2,
        "side": "buy",
        "order_type": "limit_order",
        "limit_price": "59000",
        "stop_order_type": "stop_loss_order",
        "stop_price": "55000",
        "average_fill_price": "8999.00",
        "bracket_order": false,
        "bracket_stop_loss_price": "56000",
        "bracket_stop_loss_limit_price": "57000",
        "bracket_take_profit_price": "61000",
        "bracket_take_profit_limit_price": "62000",
        "bracket_trail_amount": "50",
        "trail_amount": "50",
        "cancellation_reason": "cancelled_by_user",
        "mmp": "disabled",
        "stop_trigger_method": "last_traded_price",
        "time_in_force": "gtc",
        "updated_at": "1725865012000000",
        "paid_commission": "0.5432",
        "commission": "0.5432",
        "reduce_only": false,
        "client_order_id": "my_signal_34521712",
        "state": "open",
        "created_at": "1725865012000000",
        "product_id": 27,
        "product_symbol": "BTCUSD"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns back the order object Inline
    400 Bad Request Returns error if order could not be cancelled ApiErrorResponse

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Buy order on the product
    side sell Sell order on the product
    order_type limit_order Order placed at a specified limit price
    order_type market_order Order executed at the best available market price
    stop_order_type stop_loss_order Order triggered when stop price is hit to limit losses
    stop_order_type take_profit_order Order triggered when take profit price is hit to lock in gains
    stop_order_type liquidation_order Order automatically generated by the system to close a position during liquidation
    mmp disabled
    mmp mmp1
    mmp mmp2
    mmp mmp3
    mmp mmp4
    mmp mmp5
    stop_trigger_method mark_price Order triggered against the mark price
    stop_trigger_method last_traded_price Order triggered against the last traded price
    stop_trigger_method spot_price Order triggered against the spot index price
    time_in_force gtc Good-till-cancelled; order stays open until filled or cancelled
    time_in_force ioc Immediate-or-cancel; unfilled portion is cancelled immediately
    reduce_only false Order can open or increase a position
    reduce_only true Order can only reduce or close an existing position
    state open Order is active and resting in the orderbook
    state pending Order is waiting for its trigger condition to be met
    state closed Order has been fully filled
    state cancelled Order was cancelled before being fully filled
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Edit Order

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.put('https://api.india.delta.exchange/v2/orders', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X PUT https://api.india.delta.exchange/v2/orders \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.put 'https://api.india.delta.exchange/v2/orders',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    PUT /orders

    Body parameter

    {
      "id": 34521712,
      "product_id": 27,
      "product_symbol": "BTCUSD",
      "limit_price": "59000",
      "size": 15,
      "mmp": "disabled",
      "post_only": false,
      "stop_price": "56000",
      "trail_amount": "50"
    }
    

    Parameters

    Parameter In Type Required Description
    body body EditOrderRequest true Order which needs to be edited. Rate limits apply.

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "id": 123,
        "user_id": 453671,
        "size": 10,
        "unfilled_size": 2,
        "side": "buy",
        "order_type": "limit_order",
        "limit_price": "59000",
        "stop_order_type": "stop_loss_order",
        "stop_price": "55000",
        "average_fill_price": "8999.00",
        "bracket_order": false,
        "bracket_stop_loss_price": "56000",
        "bracket_stop_loss_limit_price": "57000",
        "bracket_take_profit_price": "61000",
        "bracket_take_profit_limit_price": "62000",
        "bracket_trail_amount": "50",
        "trail_amount": "50",
        "cancellation_reason": "cancelled_by_user",
        "mmp": "disabled",
        "stop_trigger_method": "last_traded_price",
        "time_in_force": "gtc",
        "updated_at": "1725865012000000",
        "paid_commission": "0.5432",
        "commission": "0.5432",
        "reduce_only": false,
        "client_order_id": "my_signal_34521712",
        "state": "open",
        "created_at": "1725865012000000",
        "product_id": 27,
        "product_symbol": "BTCUSD"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns back the order object with assigned id and latest state Inline
    400 Bad Request Returns error if order could not be placed ApiErrorResponse

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Buy order on the product
    side sell Sell order on the product
    order_type limit_order Order placed at a specified limit price
    order_type market_order Order executed at the best available market price
    stop_order_type stop_loss_order Order triggered when stop price is hit to limit losses
    stop_order_type take_profit_order Order triggered when take profit price is hit to lock in gains
    stop_order_type liquidation_order Order automatically generated by the system to close a position during liquidation
    mmp disabled
    mmp mmp1
    mmp mmp2
    mmp mmp3
    mmp mmp4
    mmp mmp5
    stop_trigger_method mark_price Order triggered against the mark price
    stop_trigger_method last_traded_price Order triggered against the last traded price
    stop_trigger_method spot_price Order triggered against the spot index price
    time_in_force gtc Good-till-cancelled; order stays open until filled or cancelled
    time_in_force ioc Immediate-or-cancel; unfilled portion is cancelled immediately
    reduce_only false Order can open or increase a position
    reduce_only true Order can only reduce or close an existing position
    state open Order is active and resting in the orderbook
    state pending Order is waiting for its trigger condition to be met
    state closed Order has been fully filled
    state cancelled Order was cancelled before being fully filled
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Get Active Orders

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/orders', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/orders \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/orders',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /orders

    Parameters

    Parameter In Type Required Description
    product_ids query string false Comma-separated product IDs. Maximum 10 IDs allowed. If not specified, all the orders will be returned
    states query string false comma separated list of states - open,pending
    contract_types query string false comma separated list of desired contract types, if not specified any parameters then, all the orders will be returned
    order_types query string false comma separated order types
    start_time query integer false from time in micro-seconds in epoc; referring to the order creation time
    end_time query integer false from time in micro-seconds in epoc; referring to the order creation time
    after query string false after cursor for pagination; becomes null if page after the current one does not exist
    before query string false before cursor for pagination; becomes null if page before the current one does not exist
    page_size query integer false number of records per page

    Enumerated Values

    Parameter Value Description
    contract_types futures Dated futures contracts with a fixed expiry
    contract_types perpetual_futures Futures contracts with no expiry, funded via funding rate
    contract_types call_options Call option contracts
    contract_types put_options Put option contracts
    order_types market Market order executed at the best available price
    order_types limit Limit order placed at a specified price
    order_types stop_market Stop order that triggers a market order at the stop price
    order_types stop_limit Stop order that triggers a limit order at the stop price
    order_types all_stop All stop orders (stop_market and stop_limit)

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": 123,
          "user_id": 453671,
          "size": 10,
          "unfilled_size": 2,
          "side": "buy",
          "order_type": "limit_order",
          "limit_price": "59000",
          "stop_order_type": "stop_loss_order",
          "stop_price": "55000",
          "average_fill_price": "8999.00",
          "bracket_order": false,
          "bracket_stop_loss_price": "56000",
          "bracket_stop_loss_limit_price": "57000",
          "bracket_take_profit_price": "61000",
          "bracket_take_profit_limit_price": "62000",
          "bracket_trail_amount": "50",
          "trail_amount": "50",
          "cancellation_reason": "cancelled_by_user",
          "mmp": "disabled",
          "stop_trigger_method": "last_traded_price",
          "time_in_force": "gtc",
          "updated_at": "1725865012000000",
          "paid_commission": "0.5432",
          "commission": "0.5432",
          "reduce_only": false,
          "client_order_id": "my_signal_34521712",
          "state": "open",
          "created_at": "1725865012000000",
          "product_id": 27,
          "product_symbol": "BTCUSD"
        }
      ],
      "meta": {
        "after": "g3QAAAACZAAKY3JlYXRlZF9hdHQAAAAN",
        "before": "a2PQRSACZAAKY3JlYXRlZF3fnqHBBBNZL"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of orders as per the query Inline

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Buy order on the product
    side sell Sell order on the product
    order_type limit_order Order placed at a specified limit price
    order_type market_order Order executed at the best available market price
    stop_order_type stop_loss_order Order triggered when stop price is hit to limit losses
    stop_order_type take_profit_order Order triggered when take profit price is hit to lock in gains
    stop_order_type liquidation_order Order automatically generated by the system to close a position during liquidation
    mmp disabled
    mmp mmp1
    mmp mmp2
    mmp mmp3
    mmp mmp4
    mmp mmp5
    stop_trigger_method mark_price Order triggered against the mark price
    stop_trigger_method last_traded_price Order triggered against the last traded price
    stop_trigger_method spot_price Order triggered against the spot index price
    time_in_force gtc Good-till-cancelled; order stays open until filled or cancelled
    time_in_force ioc Immediate-or-cancel; unfilled portion is cancelled immediately
    reduce_only false Order can open or increase a position
    reduce_only true Order can only reduce or close an existing position
    state open Order is active and resting in the orderbook
    state pending Order is waiting for its trigger condition to be met
    state closed Order has been fully filled
    state cancelled Order was cancelled before being fully filled
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Place Bracket order

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.post('https://api.india.delta.exchange/v2/orders/bracket', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X POST https://api.india.delta.exchange/v2/orders/bracket \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.post 'https://api.india.delta.exchange/v2/orders/bracket',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    POST /orders/bracket

    A bracket order is a set of TP and SL order. For a bracket order , size need not be specified as it closes the entire position. For a given contract, you can have multiple bracket orders for open orders but only a single bracket order for any open position.

    Body parameter

    {
      "product_id": 27,
      "product_symbol": "BTCUSD",
      "stop_loss_order": {
        "order_type": "limit_order",
        "stop_price": "56000",
        "trail_amount": "50",
        "limit_price": "55000"
      },
      "take_profit_order": {
        "order_type": "limit_order",
        "stop_price": "65000",
        "limit_price": "64000"
      },
      "bracket_stop_trigger_method": "last_traded_price"
    }
    

    Parameters

    Parameter In Type Required Description
    body body CreateBracketOrderRequest true Bracket Order which needs to be updated

    Example responses

    200 Response

    {
      "success": true
    }
    

    Responses

    Status Meaning Description Schema
    200 OK returns back success response ApiSuccessResponse
    400 Bad Request Returns error if orders could not be updated ApiErrorResponse
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Edit Bracket order

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.put('https://api.india.delta.exchange/v2/orders/bracket', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X PUT https://api.india.delta.exchange/v2/orders/bracket \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.put 'https://api.india.delta.exchange/v2/orders/bracket',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    PUT /orders/bracket

    A bracket order is a set of TP and SL order. You can specify bracket order with an order that will create a new position. Use this api to change the bracket params attached with an order.

    Body parameter

    {
      "id": 34521712,
      "product_id": 27,
      "product_symbol": "BTCUSD",
      "bracket_stop_loss_limit_price": "55000",
      "bracket_stop_loss_price": "56000",
      "bracket_take_profit_limit_price": "65000",
      "bracket_take_profit_price": "64000",
      "bracket_trail_amount": "50",
      "bracket_stop_trigger_method": "last_traded_price"
    }
    

    Parameters

    Parameter In Type Required Description
    body body EditBracketOrderRequest true Bracket Order which needs to be updated

    Example responses

    200 Response

    {
      "success": true
    }
    

    Responses

    Status Meaning Description Schema
    200 OK returns back success response ApiSuccessResponse
    400 Bad Request Returns error if orders could not be updated ApiErrorResponse
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Cancel all open orders

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.delete('https://api.india.delta.exchange/v2/orders/all', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X DELETE https://api.india.delta.exchange/v2/orders/all \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.delete 'https://api.india.delta.exchange/v2/orders/all',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    DELETE /orders/all

    Cancels all orders for a given product id. If product id is not provided, it cancels orders for provided contract types. If none of them are provided, it cancels all the orders. Provide either product id or list of contract types at a time. If both are provided, contract types will be ignored.

    Body parameter

    {
      "product_id": 27,
      "contract_types": "perpetual_futures,put_options,call_options",
      "cancel_limit_orders": false,
      "cancel_stop_orders": false,
      "cancel_reduce_only_orders": false
    }
    

    Parameters

    Parameter In Type Required Description
    body body CancelAllFilterObject false Filters for selecting orders that needs to be cancelled

    Example responses

    200 Response

    {
      "success": true
    }
    

    Responses

    Status Meaning Description Schema
    200 OK returns back success response ApiSuccessResponse
    400 Bad Request Returns error if orders could not be cancelled ApiErrorResponse
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Create batch orders

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.post('https://api.india.delta.exchange/v2/orders/batch', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X POST https://api.india.delta.exchange/v2/orders/batch \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.post 'https://api.india.delta.exchange/v2/orders/batch',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    POST /orders/batch

    Orders in a batch should belong to the same contract. Max allowed size limit in a batch is 50. Rate limits apply. Please note that ioc is not valid time in force values for creating batch orders.

    Body parameter

    {
      "product_id": 27,
      "product_symbol": "BTCUSD",
      "orders": [
        {
          "limit_price": "59000",
          "size": 10,
          "side": "buy",
          "order_type": "limit_order",
          "time_in_force": "gtc",
          "mmp": "disabled",
          "post_only": false,
          "client_order_id": "my_signal_34521712"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    body body BatchCreateOrdersRequest true Does not support time_in_force flag for orders, All orders in batch create are assumed to be gtc orders. batch create does not support stop orders, it support only limit orders

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": 123,
          "user_id": 453671,
          "size": 10,
          "unfilled_size": 2,
          "side": "buy",
          "order_type": "limit_order",
          "limit_price": "59000",
          "stop_order_type": "stop_loss_order",
          "stop_price": "55000",
          "average_fill_price": "8999.00",
          "bracket_order": false,
          "bracket_stop_loss_price": "56000",
          "bracket_stop_loss_limit_price": "57000",
          "bracket_take_profit_price": "61000",
          "bracket_take_profit_limit_price": "62000",
          "bracket_trail_amount": "50",
          "trail_amount": "50",
          "cancellation_reason": "cancelled_by_user",
          "mmp": "disabled",
          "stop_trigger_method": "last_traded_price",
          "time_in_force": "gtc",
          "updated_at": "1725865012000000",
          "paid_commission": "0.5432",
          "commission": "0.5432",
          "reduce_only": false,
          "client_order_id": "my_signal_34521712",
          "state": "open",
          "created_at": "1725865012000000",
          "product_id": 27,
          "product_symbol": "BTCUSD"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK returns the orders placed Inline
    400 Bad Request returns error if orders couldnt be placed ApiErrorResponse

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Buy order on the product
    side sell Sell order on the product
    order_type limit_order Order placed at a specified limit price
    order_type market_order Order executed at the best available market price
    stop_order_type stop_loss_order Order triggered when stop price is hit to limit losses
    stop_order_type take_profit_order Order triggered when take profit price is hit to lock in gains
    stop_order_type liquidation_order Order automatically generated by the system to close a position during liquidation
    mmp disabled
    mmp mmp1
    mmp mmp2
    mmp mmp3
    mmp mmp4
    mmp mmp5
    stop_trigger_method mark_price Order triggered against the mark price
    stop_trigger_method last_traded_price Order triggered against the last traded price
    stop_trigger_method spot_price Order triggered against the spot index price
    time_in_force gtc Good-till-cancelled; order stays open until filled or cancelled
    time_in_force ioc Immediate-or-cancel; unfilled portion is cancelled immediately
    reduce_only false Order can open or increase a position
    reduce_only true Order can only reduce or close an existing position
    state open Order is active and resting in the orderbook
    state pending Order is waiting for its trigger condition to be met
    state closed Order has been fully filled
    state cancelled Order was cancelled before being fully filled
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Edit batch orders

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.put('https://api.india.delta.exchange/v2/orders/batch', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X PUT https://api.india.delta.exchange/v2/orders/batch \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.put 'https://api.india.delta.exchange/v2/orders/batch',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    PUT /orders/batch

    Orders to be edited in a batch. Rate limits apply.

    Body parameter

    {
      "product_id": 27,
      "product_symbol": "BTCUSD",
      "orders": [
        {
          "id": 34521712,
          "limit_price": "59000",
          "size": 15,
          "mmp": "disabled",
          "post_only": false
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    body body BatchEditOrdersRequest true none

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": 123,
          "user_id": 453671,
          "size": 10,
          "unfilled_size": 2,
          "side": "buy",
          "order_type": "limit_order",
          "limit_price": "59000",
          "stop_order_type": "stop_loss_order",
          "stop_price": "55000",
          "average_fill_price": "8999.00",
          "bracket_order": false,
          "bracket_stop_loss_price": "56000",
          "bracket_stop_loss_limit_price": "57000",
          "bracket_take_profit_price": "61000",
          "bracket_take_profit_limit_price": "62000",
          "bracket_trail_amount": "50",
          "trail_amount": "50",
          "cancellation_reason": "cancelled_by_user",
          "mmp": "disabled",
          "stop_trigger_method": "last_traded_price",
          "time_in_force": "gtc",
          "updated_at": "1725865012000000",
          "paid_commission": "0.5432",
          "commission": "0.5432",
          "reduce_only": false,
          "client_order_id": "my_signal_34521712",
          "state": "open",
          "created_at": "1725865012000000",
          "product_id": 27,
          "product_symbol": "BTCUSD"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of edited orders Inline
    400 Bad Request returns error if orders couldnt be edited ApiErrorResponse

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Buy order on the product
    side sell Sell order on the product
    order_type limit_order Order placed at a specified limit price
    order_type market_order Order executed at the best available market price
    stop_order_type stop_loss_order Order triggered when stop price is hit to limit losses
    stop_order_type take_profit_order Order triggered when take profit price is hit to lock in gains
    stop_order_type liquidation_order Order automatically generated by the system to close a position during liquidation
    mmp disabled
    mmp mmp1
    mmp mmp2
    mmp mmp3
    mmp mmp4
    mmp mmp5
    stop_trigger_method mark_price Order triggered against the mark price
    stop_trigger_method last_traded_price Order triggered against the last traded price
    stop_trigger_method spot_price Order triggered against the spot index price
    time_in_force gtc Good-till-cancelled; order stays open until filled or cancelled
    time_in_force ioc Immediate-or-cancel; unfilled portion is cancelled immediately
    reduce_only false Order can open or increase a position
    reduce_only true Order can only reduce or close an existing position
    state open Order is active and resting in the orderbook
    state pending Order is waiting for its trigger condition to be met
    state closed Order has been fully filled
    state cancelled Order was cancelled before being fully filled
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Delete batch orders

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.delete('https://api.india.delta.exchange/v2/orders/batch', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X DELETE https://api.india.delta.exchange/v2/orders/batch \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.delete 'https://api.india.delta.exchange/v2/orders/batch',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    DELETE /orders/batch

    Body parameter

    {
      "product_id": 27,
      "product_symbol": "BTCUSD",
      "orders": [
        {
          "id": 13452112,
          "client_order_id": "my_signal_34521712"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    body body BatchDeleteOrdersRequest true none

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": 123,
          "user_id": 453671,
          "size": 10,
          "unfilled_size": 2,
          "side": "buy",
          "order_type": "limit_order",
          "limit_price": "59000",
          "stop_order_type": "stop_loss_order",
          "stop_price": "55000",
          "average_fill_price": "8999.00",
          "bracket_order": false,
          "bracket_stop_loss_price": "56000",
          "bracket_stop_loss_limit_price": "57000",
          "bracket_take_profit_price": "61000",
          "bracket_take_profit_limit_price": "62000",
          "bracket_trail_amount": "50",
          "trail_amount": "50",
          "cancellation_reason": "cancelled_by_user",
          "mmp": "disabled",
          "stop_trigger_method": "last_traded_price",
          "time_in_force": "gtc",
          "updated_at": "1725865012000000",
          "paid_commission": "0.5432",
          "commission": "0.5432",
          "reduce_only": false,
          "client_order_id": "my_signal_34521712",
          "state": "open",
          "created_at": "1725865012000000",
          "product_id": 27,
          "product_symbol": "BTCUSD"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK returns the orders deleted Inline
    400 Bad Request returns error if orders couldnt be deleted ApiErrorResponse

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Buy order on the product
    side sell Sell order on the product
    order_type limit_order Order placed at a specified limit price
    order_type market_order Order executed at the best available market price
    stop_order_type stop_loss_order Order triggered when stop price is hit to limit losses
    stop_order_type take_profit_order Order triggered when take profit price is hit to lock in gains
    stop_order_type liquidation_order Order automatically generated by the system to close a position during liquidation
    mmp disabled
    mmp mmp1
    mmp mmp2
    mmp mmp3
    mmp mmp4
    mmp mmp5
    stop_trigger_method mark_price Order triggered against the mark price
    stop_trigger_method last_traded_price Order triggered against the last traded price
    stop_trigger_method spot_price Order triggered against the spot index price
    time_in_force gtc Good-till-cancelled; order stays open until filled or cancelled
    time_in_force ioc Immediate-or-cancel; unfilled portion is cancelled immediately
    reduce_only false Order can open or increase a position
    reduce_only true Order can only reduce or close an existing position
    state open Order is active and resting in the orderbook
    state pending Order is waiting for its trigger condition to be met
    state closed Order has been fully filled
    state cancelled Order was cancelled before being fully filled
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Get Order by id

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/orders/{order_id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/orders/{order_id} \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/orders/{order_id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /orders/{order_id}

    Parameters

    Parameter In Type Required Description
    order_id path string true Id of the order

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "id": 123,
        "user_id": 453671,
        "size": 10,
        "unfilled_size": 2,
        "side": "buy",
        "order_type": "limit_order",
        "limit_price": "59000",
        "stop_order_type": "stop_loss_order",
        "stop_price": "55000",
        "average_fill_price": "8999.00",
        "bracket_order": false,
        "bracket_stop_loss_price": "56000",
        "bracket_stop_loss_limit_price": "57000",
        "bracket_take_profit_price": "61000",
        "bracket_take_profit_limit_price": "62000",
        "bracket_trail_amount": "50",
        "trail_amount": "50",
        "cancellation_reason": "cancelled_by_user",
        "mmp": "disabled",
        "stop_trigger_method": "last_traded_price",
        "time_in_force": "gtc",
        "updated_at": "1725865012000000",
        "paid_commission": "0.5432",
        "commission": "0.5432",
        "reduce_only": false,
        "client_order_id": "my_signal_34521712",
        "state": "open",
        "created_at": "1725865012000000",
        "product_id": 27,
        "product_symbol": "BTCUSD"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns back the order object with assigned id and latest state Inline

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Buy order on the product
    side sell Sell order on the product
    order_type limit_order Order placed at a specified limit price
    order_type market_order Order executed at the best available market price
    stop_order_type stop_loss_order Order triggered when stop price is hit to limit losses
    stop_order_type take_profit_order Order triggered when take profit price is hit to lock in gains
    stop_order_type liquidation_order Order automatically generated by the system to close a position during liquidation
    mmp disabled
    mmp mmp1
    mmp mmp2
    mmp mmp3
    mmp mmp4
    mmp mmp5
    stop_trigger_method mark_price Order triggered against the mark price
    stop_trigger_method last_traded_price Order triggered against the last traded price
    stop_trigger_method spot_price Order triggered against the spot index price
    time_in_force gtc Good-till-cancelled; order stays open until filled or cancelled
    time_in_force ioc Immediate-or-cancel; unfilled portion is cancelled immediately
    reduce_only false Order can open or increase a position
    reduce_only true Order can only reduce or close an existing position
    state open Order is active and resting in the orderbook
    state pending Order is waiting for its trigger condition to be met
    state closed Order has been fully filled
    state cancelled Order was cancelled before being fully filled
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Get Order by client oid

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/orders/client_order_id/{client_oid}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/orders/client_order_id/{client_oid} \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/orders/client_order_id/{client_oid}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /orders/client_order_id/{client_oid}

    Parameters

    Parameter In Type Required Description
    client_oid path string true Custom user provided order id (max 32 length)

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "id": 123,
        "user_id": 453671,
        "size": 10,
        "unfilled_size": 2,
        "side": "buy",
        "order_type": "limit_order",
        "limit_price": "59000",
        "stop_order_type": "stop_loss_order",
        "stop_price": "55000",
        "average_fill_price": "8999.00",
        "bracket_order": false,
        "bracket_stop_loss_price": "56000",
        "bracket_stop_loss_limit_price": "57000",
        "bracket_take_profit_price": "61000",
        "bracket_take_profit_limit_price": "62000",
        "bracket_trail_amount": "50",
        "trail_amount": "50",
        "cancellation_reason": "cancelled_by_user",
        "mmp": "disabled",
        "stop_trigger_method": "last_traded_price",
        "time_in_force": "gtc",
        "updated_at": "1725865012000000",
        "paid_commission": "0.5432",
        "commission": "0.5432",
        "reduce_only": false,
        "client_order_id": "my_signal_34521712",
        "state": "open",
        "created_at": "1725865012000000",
        "product_id": 27,
        "product_symbol": "BTCUSD"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns back the order object with assigned client order id and latest state Inline

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Buy order on the product
    side sell Sell order on the product
    order_type limit_order Order placed at a specified limit price
    order_type market_order Order executed at the best available market price
    stop_order_type stop_loss_order Order triggered when stop price is hit to limit losses
    stop_order_type take_profit_order Order triggered when take profit price is hit to lock in gains
    stop_order_type liquidation_order Order automatically generated by the system to close a position during liquidation
    mmp disabled
    mmp mmp1
    mmp mmp2
    mmp mmp3
    mmp mmp4
    mmp mmp5
    stop_trigger_method mark_price Order triggered against the mark price
    stop_trigger_method last_traded_price Order triggered against the last traded price
    stop_trigger_method spot_price Order triggered against the spot index price
    time_in_force gtc Good-till-cancelled; order stays open until filled or cancelled
    time_in_force ioc Immediate-or-cancel; unfilled portion is cancelled immediately
    reduce_only false Order can open or increase a position
    reduce_only true Order can only reduce or close an existing position
    state open Order is active and resting in the orderbook
    state pending Order is waiting for its trigger condition to be met
    state closed Order has been fully filled
    state cancelled Order was cancelled before being fully filled
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Change order leverage

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.post('https://api.india.delta.exchange/v2/products/{product_id}/orders/leverage', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X POST https://api.india.delta.exchange/v2/products/{product_id}/orders/leverage \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.post 'https://api.india.delta.exchange/v2/products/{product_id}/orders/leverage',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    POST /products/{product_id}/orders/leverage

    Body parameter

    {
      "leverage": 10
    }
    

    Parameters

    Parameter In Type Required Description
    product_id path integer true Product id of the ordered product. Either product_id or product_symbol must be preseent.
    product_symbol path string true Product symbol of the ordered product. Either product_id or product_symbol must be preseent.
    body body object true none
    Β» leverage body string true Order leverage

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "leverage": 10,
        "order_margin": "563.2",
        "product_id": 27
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK returns the OrderLeverage object Inline
    400 Bad Request Returns error if leverage couldnt be changed ApiErrorResponse

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Get order leverage

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/products/{product_id}/orders/leverage', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/products/{product_id}/orders/leverage \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/products/{product_id}/orders/leverage',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /products/{product_id}/orders/leverage

    Parameters

    Parameter In Type Required Description
    product_id path integer true Product id of the ordered product

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "leverage": 10,
        "order_margin": "563.2",
        "product_id": 27
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK returns the OrderLeverage object Inline

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Positions

    Get Open positions, Change Position Margin, Close Position, Close All Position

    Get margined positions

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/positions/margined', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/positions/margined \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/positions/margined',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /positions/margined

    Change in position may take upto 10secs to reflect. Use 'GET /position' for real-time data.

    Parameters

    Parameter In Type Required Description
    product_ids query string false Comma-separated product IDs. Maximum 10 IDs allowed. If not specified, all the open positions will be returned
    contract_types query string false comma separated list of desired contract types. If not specified any parameters then, all the open positions will be returned

    Enumerated Values

    Parameter Value Description
    contract_types perpetual_futures Futures contracts with no expiry, funded via funding rate
    contract_types call_options Call option contracts
    contract_types put_options Put option contracts

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "user_id": 0,
          "size": 0,
          "entry_price": "string",
          "margin": "string",
          "liquidation_price": "string",
          "bankruptcy_price": "string",
          "adl_level": 0,
          "product_id": 0,
          "product_symbol": "string",
          "product": {
            "id": 27,
            "symbol": "BTCUSD",
            "description": "Bitcoin Perpetual futures, quoted, settled & margined in USD",
            "created_at": "2023-12-18T13:10:39Z",
            "updated_at": "2024-11-15T02:47:50Z",
            "settlement_time": null,
            "notional_type": "vanilla",
            "impact_size": 10000,
            "initial_margin": "0.5",
            "maintenance_margin": "0.25",
            "contract_value": "0.001",
            "contract_unit_currency": "BTC",
            "tick_size": "0.5",
            "product_specs": {
              "funding_clamp_value": 0.05,
              "only_reduce_only_orders_allowed": false,
              "expiry_interval": 28800,
              "isolated_liq_penalty_factor": 0.01,
              "rate_exchange_interval": 28800,
              "tags": [
                "layer_1"
              ],
              "vol_expiry_time": 172800,
              "backup_vol_expiry_time": 31536000,
              "max_deviation_from_external_vol": 0.75,
              "max_lower_deviation_from_external_vol": 0.75,
              "max_upper_deviation_from_external_vol": 0.5,
              "max_volatility": 3,
              "min_volatility": 0.1,
              "premium_commission_rate": 0.1,
              "vol_calculation_method": "orderbook"
            },
            "state": "live",
            "trading_status": "operational",
            "max_leverage_notional": "100000",
            "default_leverage": "200",
            "initial_margin_scaling_factor": "0.0000025",
            "maintenance_margin_scaling_factor": "0.00000125",
            "taker_commission_rate": "0.0005",
            "maker_commission_rate": "0.0002",
            "liquidation_penalty_factor": "0.5",
            "contract_type": "perpetual_futures",
            "position_size_limit": 229167,
            "basis_factor_max_limit": "10.95",
            "is_quanto": false,
            "funding_method": "mark_price",
            "annualized_funding": "10.95",
            "price_band": "2.5",
            "underlying_asset": {
              "id": 14,
              "symbol": "USD",
              "precision": 8,
              "deposit_status": "enabled",
              "withdrawal_status": "enabled",
              "base_withdrawal_fee": "0.000000000000000000",
              "min_withdrawal_amount": "0.000000000000000000",
              "name": "US Dollar",
              "networks": [
                {}
              ],
              "interest_credit": false,
              "interest_slabs": null,
              "kyc_deposit_limit": "0.000000000000000000",
              "kyc_withdrawal_limit": "0.000000000000000000",
              "minimum_precision": 2,
              "sort_priority": null,
              "variable_withdrawal_fee": "0.000000000000000000"
            },
            "quoting_asset": {
              "id": 14,
              "symbol": "USD",
              "precision": 8,
              "deposit_status": "enabled",
              "withdrawal_status": "enabled",
              "base_withdrawal_fee": "0.000000000000000000",
              "min_withdrawal_amount": "0.000000000000000000",
              "name": "US Dollar",
              "networks": [
                {}
              ],
              "interest_credit": false,
              "interest_slabs": null,
              "kyc_deposit_limit": "0.000000000000000000",
              "kyc_withdrawal_limit": "0.000000000000000000",
              "minimum_precision": 2,
              "sort_priority": null,
              "variable_withdrawal_fee": "0.000000000000000000"
            },
            "settling_asset": {
              "id": 14,
              "symbol": "USD",
              "precision": 8,
              "deposit_status": "enabled",
              "withdrawal_status": "enabled",
              "base_withdrawal_fee": "0.000000000000000000",
              "min_withdrawal_amount": "0.000000000000000000",
              "name": "US Dollar",
              "networks": [
                {}
              ],
              "interest_credit": false,
              "interest_slabs": null,
              "kyc_deposit_limit": "0.000000000000000000",
              "kyc_withdrawal_limit": "0.000000000000000000",
              "minimum_precision": 2,
              "sort_priority": null,
              "variable_withdrawal_fee": "0.000000000000000000"
            },
            "spot_index": {
              "id": 14,
              "symbol": ".DEXBTUSD",
              "constituent_exchanges": [
                {
                  "name": "ExchangeA",
                  "weight": 0.25
                }
              ],
              "underlying_asset_id": 13,
              "quoting_asset_id": 14,
              "tick_size": "0.5",
              "index_type": "spot_pair",
              "config": {
                "price_alert_enabled": true,
                "quoting_asset": "string",
                "service_id": 0,
                "underlying_asset": "string"
              },
              "description": "string",
              "impact_size": "string",
              "constituent_indices": {
                "expression": "string",
                "indices": {}
              },
              "health_interval": 0,
              "is_composite": true,
              "price_method": "string"
            },
            "disruption_reason": null,
            "impact_notional": "10000",
            "position_notional_limit": null,
            "auction_start_time": "2026-08-13T05:51:51Z",
            "settlement_price": null,
            "auction_finish_time": null,
            "strike_price": "63600",
            "short_description": "BTC  Call",
            "ui_config": {
              "default_trading_view_candle": "60",
              "leverage_slider_values": [
                0
              ],
              "price_clubbing_values": [
                0
              ],
              "show_bracket_orders": true,
              "sort_priority": 0,
              "tags": [
                "string"
              ]
            },
            "launch_time": "2020-04-20T08:37:05Z",
            "insurance_fund_margin_contribution": "5",
            "barrier_price": null
          },
          "commission": "string",
          "realized_pnl": "string",
          "realized_funding": "string",
          "realized_cashflow": "-0.019078170000000000",
          "realized_holding_cost": "0",
          "unrealized_pnl": "-0.03300000",
          "unrealized_cashflow": "-0.03300000",
          "mark_price": "63755.59251216",
          "margin_mode": "isolated",
          "auto_topup": false,
          "created_at": "2026-08-12T09:05:00.376898Z",
          "updated_at": "2026-08-13T08:02:12.009909Z"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of all open positions Inline

    Response Schema

    Enumerated Values

    Property Value Description
    notional_type vanilla Contract is quoted, settled, and margined in the quote currency
    notional_type inverse Contract is quoted in the quote currency but settled and margined in the base currency
    state live Product is currently active and tradable
    state expired Product has expired and is no longer tradable
    state upcoming Product is scheduled to go live in the future
    trading_status operational Trading is fully operational; orders can be placed and cancelled
    trading_status disrupted_cancel_only Trading is disrupted; only order cancellations are allowed
    trading_status disrupted_post_only Trading is disrupted; only post-only orders are accepted
    deposit_status enabled Deposits are currently allowed for the asset
    deposit_status disabled Deposits are currently not allowed for the asset
    withdrawal_status enabled Withdrawals are currently allowed for the asset
    withdrawal_status disabled Withdrawals are currently not allowed for the asset
    index_type spot_pair Index based on a spot trading pair
    index_type fixed_interest_rate Index based on a fixed interest rate
    index_type floating_interest_rate Index based on a floating interest rate
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Get position

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/positions', params={
      'product_id': '0'
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/positions?product_id=0 \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/positions',
      params: {
      'product_id' => '0'
    }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /positions

    Get real-time positions data.

    Parameters

    Parameter In Type Required Description
    product_id query integer true id of the product. Only send either product_id or underlying_asset_symbol.
    underlying_asset_symbol query string false Underlying asset symbol. e.g. 'BTC', 'ETH'. This gives a list of all positions in products which have the given underlying asset. Only send either product_id or underlying_asset_symbol.

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "size": 0,
        "entry_price": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Open position for the give product id Inline

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Auto Topup

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.put('https://api.india.delta.exchange/v2/positions/auto_topup', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X PUT https://api.india.delta.exchange/v2/positions/auto_topup \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.put 'https://api.india.delta.exchange/v2/positions/auto_topup',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    PUT /positions/auto_topup

    Changes position auto topup flag. Positions automatically inherits auto topup flag of the account. If account level auto topop is set to false, use this api to change auto topup flag for individual positions.

    Body parameter

    {
      "product_id": 0,
      "auto_topup": "false"
    }
    

    Parameters

    Parameter In Type Required Description
    body body object true none
    Β» product_id body integer true none
    Β» auto_topup body boolean true none

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "user_id": 0,
        "size": 0,
        "entry_price": "string",
        "margin": "string",
        "liquidation_price": "string",
        "bankruptcy_price": "string",
        "adl_level": 0,
        "product_id": 0,
        "product_symbol": "string",
        "product": {
          "id": 27,
          "symbol": "BTCUSD",
          "description": "Bitcoin Perpetual futures, quoted, settled & margined in USD",
          "created_at": "2023-12-18T13:10:39Z",
          "updated_at": "2024-11-15T02:47:50Z",
          "settlement_time": null,
          "notional_type": "vanilla",
          "impact_size": 10000,
          "initial_margin": "0.5",
          "maintenance_margin": "0.25",
          "contract_value": "0.001",
          "contract_unit_currency": "BTC",
          "tick_size": "0.5",
          "product_specs": {
            "funding_clamp_value": 0.05,
            "only_reduce_only_orders_allowed": false,
            "expiry_interval": 28800,
            "isolated_liq_penalty_factor": 0.01,
            "rate_exchange_interval": 28800,
            "tags": [
              "layer_1"
            ],
            "vol_expiry_time": 172800,
            "backup_vol_expiry_time": 31536000,
            "max_deviation_from_external_vol": 0.75,
            "max_lower_deviation_from_external_vol": 0.75,
            "max_upper_deviation_from_external_vol": 0.5,
            "max_volatility": 3,
            "min_volatility": 0.1,
            "premium_commission_rate": 0.1,
            "vol_calculation_method": "orderbook"
          },
          "state": "live",
          "trading_status": "operational",
          "max_leverage_notional": "100000",
          "default_leverage": "200",
          "initial_margin_scaling_factor": "0.0000025",
          "maintenance_margin_scaling_factor": "0.00000125",
          "taker_commission_rate": "0.0005",
          "maker_commission_rate": "0.0002",
          "liquidation_penalty_factor": "0.5",
          "contract_type": "perpetual_futures",
          "position_size_limit": 229167,
          "basis_factor_max_limit": "10.95",
          "is_quanto": false,
          "funding_method": "mark_price",
          "annualized_funding": "10.95",
          "price_band": "2.5",
          "underlying_asset": {
            "id": 14,
            "symbol": "USD",
            "precision": 8,
            "deposit_status": "enabled",
            "withdrawal_status": "enabled",
            "base_withdrawal_fee": "0.000000000000000000",
            "min_withdrawal_amount": "0.000000000000000000",
            "name": "US Dollar",
            "networks": [
              {}
            ],
            "interest_credit": false,
            "interest_slabs": null,
            "kyc_deposit_limit": "0.000000000000000000",
            "kyc_withdrawal_limit": "0.000000000000000000",
            "minimum_precision": 2,
            "sort_priority": null,
            "variable_withdrawal_fee": "0.000000000000000000"
          },
          "quoting_asset": {
            "id": 14,
            "symbol": "USD",
            "precision": 8,
            "deposit_status": "enabled",
            "withdrawal_status": "enabled",
            "base_withdrawal_fee": "0.000000000000000000",
            "min_withdrawal_amount": "0.000000000000000000",
            "name": "US Dollar",
            "networks": [
              {}
            ],
            "interest_credit": false,
            "interest_slabs": null,
            "kyc_deposit_limit": "0.000000000000000000",
            "kyc_withdrawal_limit": "0.000000000000000000",
            "minimum_precision": 2,
            "sort_priority": null,
            "variable_withdrawal_fee": "0.000000000000000000"
          },
          "settling_asset": {
            "id": 14,
            "symbol": "USD",
            "precision": 8,
            "deposit_status": "enabled",
            "withdrawal_status": "enabled",
            "base_withdrawal_fee": "0.000000000000000000",
            "min_withdrawal_amount": "0.000000000000000000",
            "name": "US Dollar",
            "networks": [
              {}
            ],
            "interest_credit": false,
            "interest_slabs": null,
            "kyc_deposit_limit": "0.000000000000000000",
            "kyc_withdrawal_limit": "0.000000000000000000",
            "minimum_precision": 2,
            "sort_priority": null,
            "variable_withdrawal_fee": "0.000000000000000000"
          },
          "spot_index": {
            "id": 14,
            "symbol": ".DEXBTUSD",
            "constituent_exchanges": [
              {
                "name": "ExchangeA",
                "weight": 0.25
              }
            ],
            "underlying_asset_id": 13,
            "quoting_asset_id": 14,
            "tick_size": "0.5",
            "index_type": "spot_pair",
            "config": {
              "price_alert_enabled": true,
              "quoting_asset": "string",
              "service_id": 0,
              "underlying_asset": "string"
            },
            "description": "string",
            "impact_size": "string",
            "constituent_indices": {
              "expression": "string",
              "indices": {}
            },
            "health_interval": 0,
            "is_composite": true,
            "price_method": "string"
          },
          "disruption_reason": null,
          "impact_notional": "10000",
          "position_notional_limit": null,
          "auction_start_time": "2026-08-13T05:51:51Z",
          "settlement_price": null,
          "auction_finish_time": null,
          "strike_price": "63600",
          "short_description": "BTC  Call",
          "ui_config": {
            "default_trading_view_candle": "60",
            "leverage_slider_values": [
              0
            ],
            "price_clubbing_values": [
              0
            ],
            "show_bracket_orders": true,
            "sort_priority": 0,
            "tags": [
              "string"
            ]
          },
          "launch_time": "2020-04-20T08:37:05Z",
          "insurance_fund_margin_contribution": "5",
          "barrier_price": null
        },
        "commission": "string",
        "realized_pnl": "string",
        "realized_funding": "string",
        "realized_cashflow": "-0.019078170000000000",
        "realized_holding_cost": "0",
        "unrealized_pnl": "-0.03300000",
        "unrealized_cashflow": "-0.03300000",
        "mark_price": "63755.59251216",
        "margin_mode": "isolated",
        "auto_topup": false,
        "created_at": "2026-08-12T09:05:00.376898Z",
        "updated_at": "2026-08-13T08:02:12.009909Z"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK returns the position object Inline
    400 Bad Request Returns error if position margin could not be changed ApiErrorResponse

    Response Schema

    Enumerated Values

    Property Value Description
    notional_type vanilla Contract is quoted, settled, and margined in the quote currency
    notional_type inverse Contract is quoted in the quote currency but settled and margined in the base currency
    state live Product is currently active and tradable
    state expired Product has expired and is no longer tradable
    state upcoming Product is scheduled to go live in the future
    trading_status operational Trading is fully operational; orders can be placed and cancelled
    trading_status disrupted_cancel_only Trading is disrupted; only order cancellations are allowed
    trading_status disrupted_post_only Trading is disrupted; only post-only orders are accepted
    deposit_status enabled Deposits are currently allowed for the asset
    deposit_status disabled Deposits are currently not allowed for the asset
    withdrawal_status enabled Withdrawals are currently allowed for the asset
    withdrawal_status disabled Withdrawals are currently not allowed for the asset
    index_type spot_pair Index based on a spot trading pair
    index_type fixed_interest_rate Index based on a fixed interest rate
    index_type floating_interest_rate Index based on a floating interest rate
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Add/Remove position margin

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.post('https://api.india.delta.exchange/v2/positions/change_margin', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X POST https://api.india.delta.exchange/v2/positions/change_margin \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.post 'https://api.india.delta.exchange/v2/positions/change_margin',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    POST /positions/change_margin

    Body parameter

    {
      "product_id": 0,
      "delta_margin": "string"
    }
    

    Parameters

    Parameter In Type Required Description
    body body object true none
    Β» product_id body integer true none
    Β» delta_margin body string true Delta in the position margin, positive in case of adding margin & negative in case of removing margin

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "user_id": 0,
        "size": 0,
        "entry_price": "string",
        "margin": "string",
        "liquidation_price": "string",
        "bankruptcy_price": "string",
        "adl_level": 0,
        "product_id": 0,
        "product_symbol": "string",
        "product": {
          "id": 27,
          "symbol": "BTCUSD",
          "description": "Bitcoin Perpetual futures, quoted, settled & margined in USD",
          "created_at": "2023-12-18T13:10:39Z",
          "updated_at": "2024-11-15T02:47:50Z",
          "settlement_time": null,
          "notional_type": "vanilla",
          "impact_size": 10000,
          "initial_margin": "0.5",
          "maintenance_margin": "0.25",
          "contract_value": "0.001",
          "contract_unit_currency": "BTC",
          "tick_size": "0.5",
          "product_specs": {
            "funding_clamp_value": 0.05,
            "only_reduce_only_orders_allowed": false,
            "expiry_interval": 28800,
            "isolated_liq_penalty_factor": 0.01,
            "rate_exchange_interval": 28800,
            "tags": [
              "layer_1"
            ],
            "vol_expiry_time": 172800,
            "backup_vol_expiry_time": 31536000,
            "max_deviation_from_external_vol": 0.75,
            "max_lower_deviation_from_external_vol": 0.75,
            "max_upper_deviation_from_external_vol": 0.5,
            "max_volatility": 3,
            "min_volatility": 0.1,
            "premium_commission_rate": 0.1,
            "vol_calculation_method": "orderbook"
          },
          "state": "live",
          "trading_status": "operational",
          "max_leverage_notional": "100000",
          "default_leverage": "200",
          "initial_margin_scaling_factor": "0.0000025",
          "maintenance_margin_scaling_factor": "0.00000125",
          "taker_commission_rate": "0.0005",
          "maker_commission_rate": "0.0002",
          "liquidation_penalty_factor": "0.5",
          "contract_type": "perpetual_futures",
          "position_size_limit": 229167,
          "basis_factor_max_limit": "10.95",
          "is_quanto": false,
          "funding_method": "mark_price",
          "annualized_funding": "10.95",
          "price_band": "2.5",
          "underlying_asset": {
            "id": 14,
            "symbol": "USD",
            "precision": 8,
            "deposit_status": "enabled",
            "withdrawal_status": "enabled",
            "base_withdrawal_fee": "0.000000000000000000",
            "min_withdrawal_amount": "0.000000000000000000",
            "name": "US Dollar",
            "networks": [
              {}
            ],
            "interest_credit": false,
            "interest_slabs": null,
            "kyc_deposit_limit": "0.000000000000000000",
            "kyc_withdrawal_limit": "0.000000000000000000",
            "minimum_precision": 2,
            "sort_priority": null,
            "variable_withdrawal_fee": "0.000000000000000000"
          },
          "quoting_asset": {
            "id": 14,
            "symbol": "USD",
            "precision": 8,
            "deposit_status": "enabled",
            "withdrawal_status": "enabled",
            "base_withdrawal_fee": "0.000000000000000000",
            "min_withdrawal_amount": "0.000000000000000000",
            "name": "US Dollar",
            "networks": [
              {}
            ],
            "interest_credit": false,
            "interest_slabs": null,
            "kyc_deposit_limit": "0.000000000000000000",
            "kyc_withdrawal_limit": "0.000000000000000000",
            "minimum_precision": 2,
            "sort_priority": null,
            "variable_withdrawal_fee": "0.000000000000000000"
          },
          "settling_asset": {
            "id": 14,
            "symbol": "USD",
            "precision": 8,
            "deposit_status": "enabled",
            "withdrawal_status": "enabled",
            "base_withdrawal_fee": "0.000000000000000000",
            "min_withdrawal_amount": "0.000000000000000000",
            "name": "US Dollar",
            "networks": [
              {}
            ],
            "interest_credit": false,
            "interest_slabs": null,
            "kyc_deposit_limit": "0.000000000000000000",
            "kyc_withdrawal_limit": "0.000000000000000000",
            "minimum_precision": 2,
            "sort_priority": null,
            "variable_withdrawal_fee": "0.000000000000000000"
          },
          "spot_index": {
            "id": 14,
            "symbol": ".DEXBTUSD",
            "constituent_exchanges": [
              {
                "name": "ExchangeA",
                "weight": 0.25
              }
            ],
            "underlying_asset_id": 13,
            "quoting_asset_id": 14,
            "tick_size": "0.5",
            "index_type": "spot_pair",
            "config": {
              "price_alert_enabled": true,
              "quoting_asset": "string",
              "service_id": 0,
              "underlying_asset": "string"
            },
            "description": "string",
            "impact_size": "string",
            "constituent_indices": {
              "expression": "string",
              "indices": {}
            },
            "health_interval": 0,
            "is_composite": true,
            "price_method": "string"
          },
          "disruption_reason": null,
          "impact_notional": "10000",
          "position_notional_limit": null,
          "auction_start_time": "2026-08-13T05:51:51Z",
          "settlement_price": null,
          "auction_finish_time": null,
          "strike_price": "63600",
          "short_description": "BTC  Call",
          "ui_config": {
            "default_trading_view_candle": "60",
            "leverage_slider_values": [
              0
            ],
            "price_clubbing_values": [
              0
            ],
            "show_bracket_orders": true,
            "sort_priority": 0,
            "tags": [
              "string"
            ]
          },
          "launch_time": "2020-04-20T08:37:05Z",
          "insurance_fund_margin_contribution": "5",
          "barrier_price": null
        },
        "commission": "string",
        "realized_pnl": "string",
        "realized_funding": "string",
        "realized_cashflow": "-0.019078170000000000",
        "realized_holding_cost": "0",
        "unrealized_pnl": "-0.03300000",
        "unrealized_cashflow": "-0.03300000",
        "mark_price": "63755.59251216",
        "margin_mode": "isolated",
        "auto_topup": false,
        "created_at": "2026-08-12T09:05:00.376898Z",
        "updated_at": "2026-08-13T08:02:12.009909Z"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK returns the position object Inline
    400 Bad Request Returns error if position margin could not be changed ApiErrorResponse

    Response Schema

    Enumerated Values

    Property Value Description
    notional_type vanilla Contract is quoted, settled, and margined in the quote currency
    notional_type inverse Contract is quoted in the quote currency but settled and margined in the base currency
    state live Product is currently active and tradable
    state expired Product has expired and is no longer tradable
    state upcoming Product is scheduled to go live in the future
    trading_status operational Trading is fully operational; orders can be placed and cancelled
    trading_status disrupted_cancel_only Trading is disrupted; only order cancellations are allowed
    trading_status disrupted_post_only Trading is disrupted; only post-only orders are accepted
    deposit_status enabled Deposits are currently allowed for the asset
    deposit_status disabled Deposits are currently not allowed for the asset
    withdrawal_status enabled Withdrawals are currently allowed for the asset
    withdrawal_status disabled Withdrawals are currently not allowed for the asset
    index_type spot_pair Index based on a spot trading pair
    index_type fixed_interest_rate Index based on a fixed interest rate
    index_type floating_interest_rate Index based on a floating interest rate
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Close all positions

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.post('https://api.india.delta.exchange/v2/positions/close_all', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X POST https://api.india.delta.exchange/v2/positions/close_all \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.post 'https://api.india.delta.exchange/v2/positions/close_all',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    POST /positions/close_all

    Closes open positions for all healthy/live/tradeable products for the user. If one or more of the requested products are currently halted (disrupted_cancel_only) or in auction (disrupted_post_only), those products are skipped β€” their positions are left untouched β€” while every other, operational product is still closed normally. The skipped products, and the reason they were skipped, are listed in result.skipped_products.

    Body parameter

    {
      "close_all_portfolio": true,
      "close_all_isolated": true,
      "user_id": 0
    }
    

    Parameters

    Parameter In Type Required Description
    body body object true none
    Β» close_all_portfolio body boolean true none
    Β» close_all_isolated body boolean true none
    Β» user_id body integer true none

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "skipped_products": [
          {
            "product_id": 0,
            "product_symbol": "string",
            "reason": "market_disrupted_cancel_only_mode"
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns back success response; lists any skipped, disrupted products Inline
    400 Bad Request Returns error if not able to close all positions ApiErrorResponse

    Response Schema

    Enumerated Values

    Property Value Description
    reason market_disrupted_cancel_only_mode
    reason market_disrupted_post_only_mode
    reason market_disrupted
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    TradeHistory

    Get Orders History, Get Fill History

    Get order history (cancelled and closed)

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/orders/history', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/orders/history \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/orders/history',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /orders/history

    Parameters

    Parameter In Type Required Description
    product_ids query string false Comma separated product IDs. Maximum 10 IDs allowed.
    contract_types query string false comma separated list of desired contract types
    order_types query string false comma separated order types
    start_time query integer false from time in micro-seconds in epoc
    end_time query integer false from time in micro-seconds in epoc
    after query string false after cursor for pagination
    before query string false before cursor for pagination
    page_size query integer false number of records per page

    Enumerated Values

    Parameter Value Description
    order_types market Market order executed at the best available price
    order_types limit Limit order placed at a specified price
    order_types stop_market Stop order that triggers a market order at the stop price
    order_types stop_limit Stop order that triggers a limit order at the stop price
    order_types all_stop All stop orders (stop_market and stop_limit)

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": 123,
          "user_id": 453671,
          "size": 10,
          "unfilled_size": 2,
          "side": "buy",
          "order_type": "limit_order",
          "limit_price": "59000",
          "stop_order_type": "stop_loss_order",
          "stop_price": "55000",
          "average_fill_price": "8999.00",
          "bracket_order": false,
          "bracket_stop_loss_price": "56000",
          "bracket_stop_loss_limit_price": "57000",
          "bracket_take_profit_price": "61000",
          "bracket_take_profit_limit_price": "62000",
          "bracket_trail_amount": "50",
          "trail_amount": "50",
          "cancellation_reason": "cancelled_by_user",
          "mmp": "disabled",
          "stop_trigger_method": "last_traded_price",
          "time_in_force": "gtc",
          "updated_at": "1725865012000000",
          "paid_commission": "0.5432",
          "commission": "0.5432",
          "reduce_only": false,
          "client_order_id": "my_signal_34521712",
          "state": "open",
          "created_at": "1725865012000000",
          "product_id": 27,
          "product_symbol": "BTCUSD"
        }
      ],
      "meta": {
        "after": "g3QAAAACZAAKY3JlYXRlZF9hdHQAAAAN",
        "before": "a2PQRSACZAAKY3JlYXRlZF3fnqHBBBNZL"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of closed and cancelled orders. Order schema Inline

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Buy order on the product
    side sell Sell order on the product
    order_type limit_order Order placed at a specified limit price
    order_type market_order Order executed at the best available market price
    stop_order_type stop_loss_order Order triggered when stop price is hit to limit losses
    stop_order_type take_profit_order Order triggered when take profit price is hit to lock in gains
    stop_order_type liquidation_order Order automatically generated by the system to close a position during liquidation
    mmp disabled
    mmp mmp1
    mmp mmp2
    mmp mmp3
    mmp mmp4
    mmp mmp5
    stop_trigger_method mark_price Order triggered against the mark price
    stop_trigger_method last_traded_price Order triggered against the last traded price
    stop_trigger_method spot_price Order triggered against the spot index price
    time_in_force gtc Good-till-cancelled; order stays open until filled or cancelled
    time_in_force ioc Immediate-or-cancel; unfilled portion is cancelled immediately
    reduce_only false Order can open or increase a position
    reduce_only true Order can only reduce or close an existing position
    state open Order is active and resting in the orderbook
    state pending Order is waiting for its trigger condition to be met
    state closed Order has been fully filled
    state cancelled Order was cancelled before being fully filled
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    GET user fills by filters

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/fills', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/fills \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/fills',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /fills

    Parameters

    Parameter In Type Required Description
    product_ids query string false Comma separated product IDs. Maximum 10 IDs allowed.
    contract_types query string false comma separated list of desired contract types
    start_time query integer false from time in micro-seconds in epoc
    end_time query integer false from time in micro-seconds in epoc
    after query string false after cursor for pagination
    before query string false before cursor for pagination
    page_size query integer false number of records per page

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": "071b551365574d0aad99557931137dbd",
          "size": "1",
          "notional": "63.788",
          "product": {
            "id": 0,
            "symbol": "string",
            "contract_type": "futures",
            "tick_size": "string",
            "contract_value": "string",
            "contract_unit_currency": "string",
            "notional_type": "vanilla",
            "quoting_asset": {
              "symbol": "string",
              "precision": 0,
              "minimum_precision": 0
            },
            "underlying_asset": {
              "symbol": "string",
              "precision": 0,
              "minimum_precision": 0
            },
            "settling_asset": {
              "symbol": "string",
              "precision": 0,
              "minimum_precision": 0
            },
            "spot_index": {
              "symbol": "string"
            }
          },
          "fill_type": "normal",
          "side": "buy",
          "price": "string",
          "role": "taker",
          "commission": "string",
          "created_at": "string",
          "product_id": 0,
          "product_symbol": "string",
          "order_id": "string",
          "settling_asset_id": 0,
          "settling_asset_symbol": "string",
          "meta_data": {
            "commission_deto": "string",
            "commission_deto_in_settling_asset": "string",
            "effective_commission_rate": "string",
            "liquidation_fee_deto": "string",
            "liquidation_fee_deto_in_settling_asset": "string",
            "order_price": "string",
            "order_size": "string",
            "order_type": "string",
            "order_unfilled_size": "string",
            "tfc_used_for_commission": "string",
            "tfc_used_for_liquidation_fee": "string",
            "total_commission_in_settling_asset": "string",
            "total_liquidation_fee_in_settling_asset": "string",
            "ip": "string",
            "is_commission_on_notional": true,
            "liquidation_fee_in_settling_asset": "string",
            "mark": "string",
            "rack_commision": "string",
            "source": "string",
            "spot": "string",
            "cut": {
              "equity": 0,
              "api_trader": 0
            },
            "trading_fee_credits_used": "string",
            "original_referrer_commission": "string",
            "new_position": {
              "size": 0,
              "margin": "string",
              "entry_price": "string",
              "liquidation_price": "string",
              "bankruptcy_price": "string",
              "commission": "string",
              "total_commission_paid": "string",
              "realized_pnl": "string",
              "realized_cashflow": "string",
              "realized_funding": "string",
              "last_fill_uuid": "string"
            }
          }
        }
      ],
      "meta": {
        "after": "g3QAAAACZAAKY3JlYXRlZF9hdHQAAAAN",
        "before": "a2PQRSACZAAKY3JlYXRlZF3fnqHBBBNZL"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Array of fills Inline

    Response Schema

    Enumerated Values

    Property Value Description
    contract_type futures
    contract_type perpetual_futures
    contract_type call_options
    contract_type put_options
    notional_type vanilla
    notional_type inverse
    fill_type normal Regular fill from matching against the orderbook
    fill_type adl Fill from auto-deleveraging to balance counterparty exposure
    fill_type liquidation Fill resulting from forced liquidation of a position
    fill_type settlement Fill generated at contract settlement or expiry
    fill_type otc Off-exchange (over-the-counter) fill
    side buy Buy order on the product
    side sell Sell order on the product
    role taker Fill where the user removed liquidity from the orderbook
    role maker Fill where the user added liquidity to the orderbook
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Download Fills history

    Code samples

    import requests
    headers = {
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/fills/history/download/csv', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/fills/history/download/csv \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/fills/history/download/csv',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /fills/history/download/csv

    Parameters

    Parameter In Type Required Description
    product_ids query string false comma separated product ids
    contract_types query string false comma separated list of desired contract types
    start_time query integer false from time in micro-seconds in epoc
    end_time query integer false from time in micro-seconds in epoc

    Responses

    Status Meaning Description Schema
    200 OK csv of fills for the filter query None
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Orderbook

    L2Orderbook

    Get L2 orderbook

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/l2orderbook/{symbol}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/l2orderbook/{symbol} \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/l2orderbook/{symbol}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /l2orderbook/{symbol}

    Parameters

    Parameter In Type Required Description
    symbol path string true none
    depth query integer false number of levels on each side

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "buy": [
          {
            "depth": "983",
            "price": "9187.5",
            "size": 205640
          }
        ],
        "last_updated_at": 1654589595784000,
        "sell": [
          {
            "depth": "1185",
            "price": "9188.0",
            "size": 113752
          }
        ],
        "symbol": "BTCUSD"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK L2 orderbook for the product Inline

    Response Schema

    This operation does not require authentication.

    Trades

    Get Trades of a contract

    Get public trades

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/trades/{symbol}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/trades/{symbol} \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/trades/{symbol}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /trades/{symbol}

    Parameters

    Parameter In Type Required Description
    symbol path string true none

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "trades": [
          {
            "side": "buy",
            "size": 0,
            "price": "string",
            "timestamp": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of recent trades of the product Inline

    Response Schema

    Enumerated Values

    Property Value Description
    side buy Trade where the aggressor was a buyer
    side sell Trade where the aggressor was a seller
    This operation does not require authentication.

    Wallet

    Get balances, Get transaction history

    Get Wallet Balances

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/wallet/balances', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/wallet/balances \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/wallet/balances',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /wallet/balances

    Example responses

    200 Response

    {
      "meta": {
        "net_equity": "string",
        "robo_trading_equity": "string"
      },
      "result": [
        {
          "asset_id": 0,
          "asset_symbol": "string",
          "available_balance": "string",
          "available_balance_for_robo": "string",
          "balance": "string",
          "blocked_margin": "string",
          "commission": "string",
          "cross_asset_liability": "string",
          "cross_commission": "string",
          "cross_locked_collateral": "string",
          "cross_order_margin": "string",
          "cross_position_margin": "string",
          "id": 0,
          "interest_credit": "string",
          "order_margin": "string",
          "pending_referral_bonus": "string",
          "pending_trading_fee_credit": "string",
          "portfolio_margin": "string",
          "position_margin": "string",
          "trading_fee_credit": "string",
          "unvested_amount": "string",
          "user_id": 0
        }
      ],
      "success": true
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of wallets attached to the user account WalletPayload
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Get Wallet transactions

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/wallet/transactions', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/wallet/transactions \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/wallet/transactions',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /wallet/transactions

    Parameters

    Parameter In Type Required Description
    asset_ids query integer false comma separated list of asset_ids for which to get txns logs
    start_time query integer false from time in micro-seconds in epoc
    end_time query integer false from time in micro-seconds in epoc
    after query string false after cursor for pagination
    before query string false before cursor for pagination
    page_size query integer false number of records per page
    transaction_types query TransactionTypes false transaction types to retrieve

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": 0,
          "amount": "string",
          "balance": "string",
          "transaction_type": "string",
          "meta_data": {},
          "product_id": 0,
          "asset_id": 0,
          "asset_symbol": 0,
          "created_at": "string"
        }
      ],
      "meta": {
        "after": "g3QAAAACZAAKY3JlYXRlZF9hdHQAAAAN",
        "before": "a2PQRSACZAAKY3JlYXRlZF3fnqHBBBNZL"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK list of Wallet transactions Inline

    Response Schema

    Enumerated Values

    Property Value Description
    transaction_type cashflow Generic cash credit or debit on the wallet
    transaction_type deposit Funds deposited into the wallet
    transaction_type withdrawal Funds withdrawn from the wallet
    transaction_type commission Trading commission charged on a fill
    transaction_type conversion Currency or asset conversion entry
    transaction_type funding Perpetual funding payment exchanged between long and short
    transaction_type settlement Wallet entry generated at contract settlement
    transaction_type liquidation_fee Fee charged when a position is liquidated
    transaction_type spot_trade Wallet entry from a spot trade
    transaction_type withdrawal_cancellation Reversal of a previously requested withdrawal
    transaction_type referral_bonus Bonus credited from the referral program
    transaction_type sub_account_transfer Transfer between a main account and a subaccount
    transaction_type commission_rebate Rebate paid back on previously charged commission
    transaction_type promo_credit Promotional credit added to the wallet
    transaction_type trading_credits Trading credits granted to the user
    transaction_type trading_credits_forfeited Trading credits forfeited (e.g. on expiry)
    transaction_type trading_credits_paid Trading credits applied toward trading fees
    transaction_type trading_fee_credits_paid_liquidation_fee Trading credits applied toward a liquidation fee
    transaction_type trading_credits_reverted Reversal of previously applied trading credits
    transaction_type interest_credit Interest credited on the wallet balance
    transaction_type external_deposit Deposit from an external/off-exchange source
    transaction_type credit_line Credit line adjustment on the wallet
    transaction_type trading_competition Wallet entry related to a trading competition
    transaction_type fund_deposit Deposit into a managed fund
    transaction_type fund_withdrawal Withdrawal from a managed fund
    transaction_type fund_wallet_deposit Deposit into the fund wallet
    transaction_type fund_wallet_withdrawal Withdrawal from the fund wallet
    transaction_type fund_reward Reward credited from a managed fund
    transaction_type trade_farming_reward Reward credited from the trade farming program
    transaction_type interest_credit Interest credited on the wallet balance
    transaction_type revert Reversal of a prior wallet transaction
    transaction_type raf_bonus Refer-a-friend bonus credited to the wallet
    transaction_type fill_appropriation Adjustment from appropriation of a fill
    transaction_type incident_compensation Compensation credited due to an incident
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Download Wallet transactions

    Code samples

    import requests
    headers = {
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/wallet/transactions/download', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/wallet/transactions/download \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/wallet/transactions/download',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /wallet/transactions/download

    Parameters

    Parameter In Type Required Description
    asset_ids query integer false comma separated list of asset_ids
    start_time query integer false from time in micro-seconds in epoc
    end_time query integer false from time in micro-seconds in epoc
    after query string false after cursor for pagination
    before query string false before cursor for pagination
    page_size query integer false number of records per page

    Responses

    Status Meaning Description Schema
    200 OK csv of transactions for that wallet None
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Request asset transfer

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.post('https://api.india.delta.exchange/v2/wallets/sub_account_balance_transfer', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X POST https://api.india.delta.exchange/v2/wallets/sub_account_balance_transfer \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.post 'https://api.india.delta.exchange/v2/wallets/sub_account_balance_transfer',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    POST /wallets/sub_account_balance_transfer

    This api transfers asset from one subaccount to another subaccount or to the main/parent account. Please ensure that the subaccounts involved in the transfer should belong to the same parent account. Requests to transfer assets across subaccounts that belong to different parent accounts will fail. Please make sure that the api key used to make this api request belongs to the main/parent account.

    Body parameter

    {
      "transferrer_user_id": "string",
      "transferee_user_id": "string",
      "asset_symbol": "string",
      "amount": null
    }
    

    Parameters

    Parameter In Type Required Description
    body body AssetTransferSubaccountReq true none

    Example responses

    200 Response

    {
      "success": true,
      "result": null
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns success message Inline
    400 Bad Request Returns error code ApiErrorResponse

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Request subaccount balance transfer history.

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/wallets/sub_accounts_transfer_history', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/wallets/sub_accounts_transfer_history \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/wallets/sub_accounts_transfer_history',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /wallets/sub_accounts_transfer_history

    This api returns the wallet balance transfers for subaccounts belonging to the parent/main account of an api user. Make sure you are calling this api from the main account. If no subaccount is mentioned in the request, data for all the subacounts will be returned. Use page size to get more entries in a single request.

    Body parameter

    {
      "subaccount_user_id": "string",
      "before": "string",
      "after": "string",
      "page_size": 10
    }
    

    Parameters

    Parameter In Type Required Description
    body body SubaccountTransferHistory true none

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "transferrer_user_id": "string",
          "transferee_user_id": "string",
          "asset_symbol": "string",
          "amount": null,
          "created_at": "string",
          "transferee_user": {},
          "transferrer_user": {}
        }
      ],
      "meta": {
        "after": "g3QAAAACZAAKY3JlYXRlZF9hdHQAAAAN",
        "before": "a2PQRSACZAAKY3JlYXRlZF3fnqHBBBNZL"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns success message Inline
    400 Bad Request Returns error code ApiErrorResponse

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Stats

    Get Volume Stats

    Get volume stats

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/stats', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/stats \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/stats',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /stats

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "last_30_days_volume": 0,
        "last_7_days_volume": 0,
        "total_volume": 0
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK sum of turnover in the last 7 and 30 days along with Total Volume in the last 24 hours (in USD) Inline

    Response Schema

    This operation does not require authentication.

    MMP

    Market maker protection

    Update MMP config

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.put('https://api.india.delta.exchange/v2/users/update_mmp', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X PUT https://api.india.delta.exchange/v2/users/update_mmp \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.put 'https://api.india.delta.exchange/v2/users/update_mmp',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    PUT /users/update_mmp

    Channel provides updates when MMP is triggered. Market maker protection is available to registered market makers by default.

    Body parameter

    {
      "asset": "string",
      "window_interval": 0,
      "freeze_interval": 0,
      "trade_limit": "string",
      "delta_limit": "string",
      "vega_limit": "string",
      "mmp": "mmp1"
    }
    

    Parameters

    Parameter In Type Required Description
    body body MMPConfigUpdateRequest true mmp config for a given underlying asset

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "user_id": 57354187,
        "default_auto_topup": true,
        "mmp_config": null,
        "deto_for_commission": false,
        "vip_level": 0,
        "vip_discount_factor": "0.00",
        "volume_30d": "1060.675333",
        "email_preferences": {
          "adl": true,
          "liquidation": true,
          "margin_topup": false,
          "marketing": true,
          "order_cancel": true,
          "order_fill": true,
          "stop_order_trigger": true
        },
        "notification_preferences": {
          "adl": true,
          "liquidation": true,
          "margin_topup": false,
          "marketing": true,
          "order_cancel": false,
          "order_fill": true,
          "price_alert": true,
          "stop_order_trigger": true
        },
        "price_alert_assets": [
          "BTC",
          "ETH"
        ],
        "enabled_portfolios": {},
        "interest_credit": false
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns back the User Preference which contains mmp config Inline
    400 Bad Request Returns error if mmp is not enabled on the account ApiErrorResponse

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Reset MMP

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.put('https://api.india.delta.exchange/v2/users/reset_mmp', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X PUT https://api.india.delta.exchange/v2/users/reset_mmp \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.put 'https://api.india.delta.exchange/v2/users/reset_mmp',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    PUT /users/reset_mmp

    Body parameter

    {
      "asset": "string",
      "mmp": "mmp1"
    }
    

    Parameters

    Parameter In Type Required Description
    body body MMPResetRequest true reset mmp config for a given underlying asset

    Example responses

    200 Response

    {
      "success": true
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns back the User Preference which contains mmp config ApiSuccessResponse
    400 Bad Request Returns error if mmp is not enabled on the account ApiErrorResponse
    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Account

    Account level settings

    Get users trading preferences

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/users/trading_preferences', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/users/trading_preferences \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/users/trading_preferences',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /users/trading_preferences

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "user_id": 57354187,
        "default_auto_topup": true,
        "mmp_config": null,
        "deto_for_commission": false,
        "vip_level": 0,
        "vip_discount_factor": "0.00",
        "volume_30d": "1060.675333",
        "email_preferences": {
          "adl": true,
          "liquidation": true,
          "margin_topup": false,
          "marketing": true,
          "order_cancel": true,
          "order_fill": true,
          "stop_order_trigger": true
        },
        "notification_preferences": {
          "adl": true,
          "liquidation": true,
          "margin_topup": false,
          "marketing": true,
          "order_cancel": false,
          "order_fill": true,
          "price_alert": true,
          "stop_order_trigger": true
        },
        "price_alert_assets": [
          "BTC",
          "ETH"
        ],
        "enabled_portfolios": {},
        "interest_credit": false
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK User trading preferences attached to the account Inline

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Update users trading preferences

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.put('https://api.india.delta.exchange/v2/users/trading_preferences', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X PUT https://api.india.delta.exchange/v2/users/trading_preferences \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.put 'https://api.india.delta.exchange/v2/users/trading_preferences',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    PUT /users/trading_preferences

    Body parameter

    {
      "default_auto_topup": true,
      "showMarketOrdersForOptionsInBracket": true,
      "interest_credit": false,
      "email_preferences": {
        "adl": true,
        "liquidation": true,
        "order_fill": true,
        "stop_order_trigger": true,
        "order_cancel": true,
        "marketing": true
      },
      "notification_preferences": {
        "adl": false,
        "liquidation": true,
        "order_fill": true,
        "stop_order_trigger": true,
        "price_alert": true,
        "marketing": true
      }
    }
    

    Parameters

    Parameter In Type Required Description
    body body EditUserPreference true trading preferences

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "user_id": 57354187,
        "default_auto_topup": true,
        "mmp_config": null,
        "deto_for_commission": false,
        "vip_level": 0,
        "vip_discount_factor": "0.00",
        "volume_30d": "1060.675333",
        "email_preferences": {
          "adl": true,
          "liquidation": true,
          "margin_topup": false,
          "marketing": true,
          "order_cancel": true,
          "order_fill": true,
          "stop_order_trigger": true
        },
        "notification_preferences": {
          "adl": true,
          "liquidation": true,
          "margin_topup": false,
          "marketing": true,
          "order_cancel": false,
          "order_fill": true,
          "price_alert": true,
          "stop_order_trigger": true
        },
        "price_alert_assets": [
          "BTC",
          "ETH"
        ],
        "enabled_portfolios": {},
        "interest_credit": false
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK User trading preferences attached to the account Inline

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Get subaccounts

    Code samples

    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/sub_accounts', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/sub_accounts \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/sub_accounts',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /sub_accounts

    This api returns all the subaccounts belonging to the same parent/main user. Make sure to call this api from the parent user.

    Example responses

    200 Response

    {
      "success": true,
      "result": [
        {
          "id": "98765432",
          "email": "[email protected]",
          "account_name": "Main",
          "first_name": "Rajesh",
          "last_name": "Sharma",
          "dob": "1985-08-25",
          "country": "India",
          "phone_number": "9876543210",
          "margin_mode": "isolated",
          "pf_index_symbol": ".DEXBTUSD",
          "is_sub_account": false,
          "is_kyc_done": true
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Subaccounts belonging to the same parent account. Inline

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Change margin mode

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.put('https://api.india.delta.exchange/v2/users/margin_mode', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X PUT https://api.india.delta.exchange/v2/users/margin_mode \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.put 'https://api.india.delta.exchange/v2/users/margin_mode',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    PUT /users/margin_mode

    Body parameter

    {
      "margin_mode": "isolated",
      "subaccount_user_id": "5112346"
    }
    

    Parameters

    Parameter In Type Required Description
    body body ChangeMarginModeRequest true changes margin mode of the user

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "id": "5112346",
        "margin_mode": "isolated"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns the ChangeMarginModeResponse with the updated margin mode Inline
    400 Bad Request Returns error if margin mode could not be changed ApiErrorResponse

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Get current rate limit quota

    Code samples

    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.india.delta.exchange/v2/rate_limits/quota', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X GET https://api.india.delta.exchange/v2/rate_limits/quota \
      -H 'Accept: application/json'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.india.delta.exchange/v2/rate_limits/quota',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    GET /rate_limits/quota

    Example responses

    200 Response

    {
      "current_quota": 42,
      "remaining_time_in_milliseconds": 120632
    }
    

    Responses

    Status Meaning Description Schema
    200 OK This api returns the current rate limit quota. RateLimitQuotaResponse
    This operation does not require authentication.

    Heartbeat Management

    Create Heartbeat

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.post('https://api.india.delta.exchange/v2/heartbeat/create', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X POST https://api.india.delta.exchange/v2/heartbeat/create \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.post 'https://api.india.delta.exchange/v2/heartbeat/create',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    

    POST /heartbeat/create

    Body parameter

    {
      "heartbeat_id": "string",
      "impact": "contracts",
      "contract_types": [
        "string"
      ],
      "underlying_assets": [
        "string"
      ],
      "product_symbols": [
        "string"
      ],
      "default_ttl": 0,
      "config": [
        {
          "action": "cancel_orders",
          "unhealthy_count": 0,
          "value": 0
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    body body CreateHeartbeat true heartbeat creation details

    Example responses

    200 Response

    {
      "success": true,
      "result": {
        "heartbeat_id": "string",
        "status": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Heartbeat created successfully Inline
    400 Bad Request Returns if heartbeat couldnt be created ApiErrorResponse

    Response Schema

    To perform this operation, you must be sign the request using your api key and secret. See Authentication section for more details.

    Send Heartbeat Acknowledgment

    Code samples

    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': '****',
      'signature': '****',
      'timestamp': '****'
    }
    
    r = requests.post('https://api.india.delta.exchange/v2/heartbeat', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    # You can also use wget
    curl -X POST https://api.india.delta.exchange/v2/heartbeat \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: ****' \
      -H 'signature: ****' \
      -H 'timestamp: ****'
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => '****',
      'signature' => '****',
      'timestamp' => '****'
    }
    
    result = RestClient.post 'https://api.india.delta.exchange/v2/heartbeat',
      params: {
      }, headers: headers
    
    p JS

    [Page truncated to keep GeezerVison snappy.]

    You are visitor 01402792 β€” GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.