Skip to main content

Demo Trading Service

Introduction

Bybit v5 Open API supports demo trading account, but please note not every API is available for demo trading account because demo trading service is mainly for trading experience purpose, so that it does not have a complete function compared with the real trading service.

Create API Key

  1. You need to log in to your mainnet account;
  2. Switch to Demo Trading, please note it is an independent account for demo trading only, and it has its own user ID;
  3. Hover the mouse on user avatar, then click "API" to generate api key and secret;

Usage rules

  • Basic trading rules are the same as real trading
  • Orders generated in demo trading keep 7 days
  • Default rate limit, not upgradable

Domain

Mainnet Demo Trading URL:
Rest API: https://api-demo.bybit.com
Websocket : wss://stream-demo.bybit.com

Available API List

CateogoryTitleEndpoint
MarketAllall endpoints
TradePlace Order/v5/order/create
Amend Order/v5/order/amend
Cancel order/v5/order/cancel
Get Open Orders/v5/order/realtime
Cancel All Orders/v5/order/cancel-all
Get Order History/v5/order/history
Get Trade History/v5/execution/list
Batch Place Order/v5/order/create-batch (linear,option)
Batch Amend Order/v5/order/amend-batch (linear,option)
Batch Cancel Order/v5/order/cancel-batch (linear,option)
PositionGet Position Info/v5/position/list
Set Leverage/v5/position/set-leverage
Switch Position Mode/v5/position/switch-mode
Set Trading Stop/v5/position/trading-stop
Set Auto Add Margin/v5/position/set-auto-add-margin
Add Or Reduce Margin/v5/position/add-margin
Get Closed PnL/v5/position/closed-pnl
AccountGet Wallet Balance/v5/account/wallet-balance
Get Borrow History/v5/account/borrow-history
Set Collateral Coin/v5/account/set-collateral-switch
Get Collateral Info/v5/account/collateral-info
Get Coin Greeks/v5/asset/coin-greeks
Get Account Info/v5/account/info
Get Transaction Log/v5/account/transaction-log
Set Margin Mode/v5/account/set-margin-mode
Set Spot Hedging/v5/account/set-hedging-mode
AssetGet Delivery Record/v5/asset/delivery-record
Get USDC Session Settlement/v5/asset/settlement-record
Spot Margin TradeToggle Margin Trade/v5/spot-margin-trade/switch-mode
Set Leverage/v5/spot-margin-trade/set-leverage
Get Status And Leverage/v5/spot-margin-uta/status
WS Privateorder,execution,position,wallet,greeks/v5/private

Request Demo Trading Funds

HTTP Request

POST /v5/account/demo-apply-money

Request Parameters

ParameterRequiredTypeComments
utaDemoApplyMoneyfalsearray
> coinfalsestringApplied coin, supports BTC, ETH, USDT, USDC
> amountStrfalsestringApplied amount, the max applied amount in each request
  • BTC: "15"
  • ETH: "200"
  • USDT: "100000"
  • USDC: "100000"
  • Request Example

    POST /v5/account/demo-apply-money HTTP/1.1
    Host: api-demo.bybit.com
    X-BAPI-SIGN: XXXXXXX
    X-BAPI-API-KEY: XXXXXXX
    X-BAPI-TIMESTAMP: 1711420489915
    X-BAPI-RECV-WINDOW: 5000
    Content-Type: application/json

    {
    "utaDemoApplyMoney": [
    {
    "coin": "USDT",
    "amountStr": "109"
    },
    {
    "coin": "ETH",
    "amountStr": "1"
    }
    ]
    }