ZebPay Trade API

This endpoint allows users to read order data, create a new order, or cancel a previously placed order. Signature Generation for POST Methods: The following JavaScript code should be added to the Pre-request Script tab in Postman. It automatically generates the required signature and includes the API key and signature in the request headers. // Import crypto for HMAC-SHA256 signature calculation const CryptoJS = require('crypto-js'); // API key and secret const APIKEY = ''; const SECRET = ''; // Generate the current timestamp const timestamp = Date.now(); // Unix time in milliseconds //read boday data and pass update timestamp const body = pm.request.body.raw const payload = JSON.parse(body); payload.timestamp = timestamp; // Stringify the payload const payloadString = JSON.stringify(payload); // Function to calculate HMAC-SHA256 signature function calculateSignature(payload, secret) { const hash = CryptoJS.HmacSHA256(payload, secret); return hash.toString(CryptoJS.enc.Hex); } // Calculate the signature const signature = calculateSignature(payloadString, SECRET); // Set headers dynamically pm.request.headers.upsert({ key: "X-AUTH-APIKEY", value: APIKEY, }); pm.request.headers.upsert({ key: "X-AUTH-SIGNATURE", value: signature, }); // Replace request body with the dynamically generated payload pm.request.body.update(payloadString); Signature Generation for GET Methods: // Import crypto for HMAC-SHA256 signature calculation const CryptoJS = require('crypto-js'); // API key and secret const APIKEY = ''; const SECRET = ''; // Function to calculate HMAC-SHA256 signature function calculateSignature(payload, secret) { const hash = CryptoJS.HmacSHA256(payload, secret); // Use CryptoJS for HMAC return hash.toString(CryptoJS.enc.Hex); // Convert to hexadecimal } // Generate a timestamp const timestamp = Date.now(); // Current Unix timestamp in milliseconds // Access the query parameters from the request URL let queryParams = pm.request.url.query; // Convert query parameters into a key-value object let queryObject = {}; queryParams.each(param => { queryObject[param.key] = param.value; }); // Update or set the parameter dynamically queryObject['timestamp'] = Date.now() // Update 'timestamp' parameter // Convert query parameters to query string const queryString = Object.entries(queryObject) .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`) .join('&'); // Generate the signature const signature = calculateSignature(queryString, SECRET); // Set headers dynamically pm.request.headers.upsert({ key: "X-AUTH-APIKEY", value: APIKEY, }); pm.request.headers.upsert({ key: "X-AUTH-SIGNATURE", value: signature, }); // Update the URL with the query parameters pm.request.url.query.clear(); // Clear existing query params queryString.split('&').forEach((param) => { const [key, value] = param.split('='); pm.request.url.query.add({ key, value }); });

Operations 10

POST /orders Place a New Market Sell Order #
GET /orders List Trade Complete Orders #
GET /orders/{orderId}/fills Fills #
DELETE /orders/{orderId} Cancel Trade Order #
DELETE /orders/cancelall Cancel All Trade Orders #
GET /tradefees/BTC-INR TDS and Fees #
GET /orders/balance Trade Balance #
GET /wallet/balance Wallet Balance #
GET /tradepairs/IN Trade Pairs #
GET /Instantcoins/IN QT Pairs #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/zebpay:zebpay-trade-api-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

zebpay-trade-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Zebpay Trade API
  version: 1.0.0
  x-refined-note:
  - x-generated differs across the merged source definitions and was not carried
  - x-method differs across the merged source definitions and was not carried
  - x-source differs across the merged source definitions and was not carried
  description: 'Operations tagged Trade API across 2 of this provider''s published API definitions: zebpay-postman-converted.yml, zebpay-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://{{baseurl}}
- url: https://www.zebapi.com
- url: https://futuresbe.zebpay.com
- url: https://www.zebapi.com/api/v1
  description: Spot (legacy), collection baseurl variable
tags:
- name: Trade API
  description: This endpoint allows users to read order data, create a new order, or cancel a previously placed order.
paths:
  /orders:
    post:
      tags:
      - Trade API
      summary: Place a New Market Sell Order
      description: User can place a market order, which will be executed immediately at the current market price. The amount of quote currency for the given pair will be kept on hold for the duration of the order.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                trade_pair: BTC-INR
                side: ask
                size: 1.0e-05
                tradeType: 2
                platform: API_Trading
                timestamp: 0
      parameters:
      - name: X-AUTH-APIKEY
        in: header
        schema:
          type: string
        example: '{{APIKEY}}'
      - name: X-AUTH-SIGNATURE
        in: header
        schema:
          type: string
        example: '{{ApiSignature}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 12 Nov 2024 13:31:28 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Transfer-Encoding:
              schema:
                type: string
                example: chunked
            Connection:
              schema:
                type: string
                example: keep-alive
            access-control-expose-headers:
              schema:
                type: string
                example: Order-Total-Count
            CF-Cache-Status:
              schema:
                type: string
                example: DYNAMIC
            X-Frame-Options:
              schema:
                type: string
                example: SAMEORIGIN
            Server:
              schema:
                type: string
                example: cloudflare
            CF-RAY:
              schema:
                type: string
                example: 8e16e1f0d9e0401f-BOM
            Content-Encoding:
              schema:
                type: string
                example: gzip
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  id: 1395508961
                  price: 0
                  side: ask
                  size: 1.0e-05
                  status: pending
                  trade_pair: BTC-INR
                  type: Market
                  created_at: 1753340818725
                statusCode: 200
                statusDescription: Success
      operationId: postOrders
      x-operation-id-source: derived
    get:
      tags:
      - Trade API
      summary: List Trade Complete Orders
      description: Users can list their current orders and can also view open as well as settled orders. User needs to pass ORDER STATUS "Pending" to get all unsettled orders, "all" to get all orders.
      security:
      - noauthAuth: []
      parameters:
      - name: X-AUTH-APIKEY
        in: header
        schema:
          type: string
        example: '{{APIKEY}}'
      - name: X-AUTH-SIGNATURE
        in: header
        schema:
          type: string
        example: '{{ApiSignature}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Wed, 16 Oct 2024 15:46:11 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Transfer-Encoding:
              schema:
                type: string
                example: chunked
            Connection:
              schema:
                type: string
                example: keep-alive
            access-control-expose-headers:
              schema:
                type: string
                example: Order-Total-Count
            CF-Cache-Status:
              schema:
                type: string
                example: DYNAMIC
            Server:
              schema:
                type: string
                example: cloudflare
            CF-RAY:
              schema:
                type: string
                example: 8d392e25f983414e-BOM
            Content-Encoding:
              schema:
                type: string
                example: gzip
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                - id: 616239111
                  price: 4400000
                  size: 0.00020455
                  type: limit
                  trade_pair: BTC-INR
                  side: Bid
                  created_at: 1729093567540
                  executed_value: 900.02
                  open_size: 0.00020455
                  filled_size: 0
                  status: pending
                  market_order_amt: 0
                  stop_price: 0
                statusCode: 200
                statusDescription: Success
      operationId: getOrders
      x-operation-id-source: derived
    servers:
    - url: http://{{baseurl}}
    - url: https://www.zebapi.com
    - url: https://futuresbe.zebpay.com
  /orders/{orderId}/fills:
    get:
      tags:
      - Trade API
      summary: Fills
      description: Users can get a single order's detail/fills by order id by using this API.
      security:
      - noauthAuth: []
      parameters:
      - name: X-AUTH-APIKEY
        in: header
        schema:
          type: string
        example: '{{APIKEY}}'
      - name: X-AUTH-SIGNATURE
        in: header
        schema:
          type: string
        example: '{{ApiSignature}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      - name: orderId
        in: path
        schema:
          type: string
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: getOrdersByOrderIdFills
      x-operation-id-source: derived
    servers:
    - url: http://{{baseurl}}
    - url: https://www.zebapi.com
    - url: https://futuresbe.zebpay.com
  /orders/{orderId}:
    delete:
      tags:
      - Trade API
      summary: Cancel Trade Order
      description: Users can cancel previously placed order by using this API.
      security:
      - noauthAuth: []
      parameters:
      - name: X-AUTH-APIKEY
        in: header
        schema:
          type: string
        example: '{{APIKEY}}'
      - name: X-AUTH-SIGNATURE
        in: header
        schema:
          type: string
        example: '{{ApiSignature}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      - name: orderId
        in: path
        schema:
          type: string
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: deleteOrdersByOrderId
      x-operation-id-source: derived
    servers:
    - url: http://{{baseurl}}
    - url: https://www.zebapi.com
    - url: https://futuresbe.zebpay.com
  /orders/cancelall:
    delete:
      tags:
      - Trade API
      summary: Cancel All Trade Orders
      description: Users can cancel all the previously placed order(s) for trade pair by using this API.
      parameters:
      - name: X-AUTH-APIKEY
        in: header
        schema:
          type: string
        example: '{{APIKEY}}'
      - name: X-AUTH-SIGNATURE
        in: header
        schema:
          type: string
        example: '{{ApiSignature}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: deleteOrdersCancelall
      x-operation-id-source: derived
    servers:
    - url: http://{{baseurl}}
    - url: https://www.zebapi.com
    - url: https://futuresbe.zebpay.com
  /tradefees/BTC-INR:
    get:
      tags:
      - Trade API
      summary: TDS and Fees
      description: Provides TDS and Fees information.
      parameters:
      - name: X-AUTH-APIKEY
        in: header
        schema:
          type: string
        example: '{{APIKEY}}'
      - name: X-AUTH-SIGNATURE
        in: header
        schema:
          type: string
        example: '{{ApiSignature}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: getTradefeesBTCINR
      x-operation-id-source: derived
    servers:
    - url: http://{{baseurl}}
    - url: https://www.zebapi.com
    - url: https://futuresbe.zebpay.com
  /orders/balance:
    get:
      tags:
      - Trade API
      summary: Trade Balance
      description: 'Get Balance for Trade Pair


        This request retrieves the balance information for a specific trade pair for a user.


        Purpose


        The purpose of this request is to provide the user with balance information for a specific trade pair. If the trade_pair is not provided, the request will return balances for all coins.


        Parameters


        trade_pair (optional): The specific trade pair for which balance information is requested. If not provided, the request will return balances for all coins.'
      parameters:
      - name: X-AUTH-APIKEY
        in: header
        schema:
          type: string
        example: '{{APIKEY}}'
      - name: X-AUTH-SIGNATURE
        in: header
        schema:
          type: string
        example: '{{ApiSignature}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: getOrdersBalance
      x-operation-id-source: derived
    servers:
    - url: http://{{baseurl}}
    - url: https://www.zebapi.com
    - url: https://futuresbe.zebpay.com
  /wallet/balance:
    get:
      tags:
      - Trade API
      summary: Wallet Balance
      description: 'Request Description


        This request retrieves the balances of all coins for a user.


        Purpose


        The purpose of this request is to provide user balances of all coins.


        Parameters


        trade_pair (optional): If not provided, the request will return balances for all coins.'
      parameters:
      - name: X-AUTH-APIKEY
        in: header
        schema:
          type: string
        example: '{{APIKEY}}'
      - name: X-AUTH-SIGNATURE
        in: header
        schema:
          type: string
        example: '{{ApiSignature}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: getWalletBalance
      x-operation-id-source: derived
    servers:
    - url: http://{{baseurl}}
    - url: https://www.zebapi.com
    - url: https://futuresbe.zebpay.com
  /tradepairs/IN:
    get:
      tags:
      - Trade API
      summary: Trade Pairs
      description: Trade Pairs API retrieves a list of available trading pairs.
      parameters:
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: getTradepairsIN
      x-operation-id-source: derived
    servers:
    - url: http://{{baseurl}}
    - url: https://www.zebapi.com
    - url: https://futuresbe.zebpay.com
  /Instantcoins/IN:
    get:
      tags:
      - Trade API
      summary: QT Pairs
      description: QT Pairs API provides a list of active Quick Trade pairs.
      parameters:
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
      operationId: getInstantcoinsIN
      x-operation-id-source: derived
    servers:
    - url: http://{{baseurl}}
    - url: https://www.zebapi.com
    - url: https://futuresbe.zebpay.com
components:
  securitySchemes:
    noauthAuth:
      type: http
      scheme: noauth
x-refined-from:
- zebpay-postman-converted.yml
- zebpay-openapi.yml