Hyblock API
Terminal
Terminal
    • Authentication
    • Orderflow
      • Kline
        GET
      • Exchange Premium
        GET
      • Buy volume
        GET
      • Sell volume
        GET
      • Volume delta
        GET
      • Volume ratio
        GET
      • Anchored cvd
        GET
      • Bot Tracker
        GET
      • Slippage
        GET
      • Transfer Of Contracts
        GET
      • Participation Ratio
        GET
      • Market Order Count
        GET
      • Market Order Average Size
        GET
      • Limit Order Count
        GET
      • Limit Order Average Size
        GET
      • Buy Sell Trade Count Ratio
        GET
      • Limit Order Count Ratio
        GET
      • Market Order Count Ratio
        GET
      • Previous Day Level
        GET
      • Previous Week Level
        GET
      • Previous Month Level
        GET
    • Funding Rate
      • Funding Rate
        GET
    • Longs & Shorts
      • Top Trader Accounts
        GET
      • Top Trader Positions
        GET
      • Anchored Top Trader Accounts
        GET
      • Anchored Top Trader Positions
        GET
      • Global Accounts
        GET
      • Anchored Global Accounts
        GET
      • Net Long Short
        GET
      • Net Long Short Delta
        GET
      • Anchored CLSD
        GET
      • Anchored CLS
        GET
      • Whale Retail Delta
        GET
      • Anchored Whale Retail Delta
        GET
      • True Retail Long Short
        GET
      • Whale Position Dominance
        GET
      • Trader Sentiment Gap
        GET
    • Orderbook
      • Bid Ask
      • Bid Ask Ratio
      • Bid Ask Delta
      • Bid Ask Ratio Diff
      • Bids Ask Spread
      • Combined Book
      • Bids Increase Decrease
      • Asks Increase Decrease
      • Best Bid Ask
      • Market Imbalance Index
    • Global Metrics
      • Global Bid Ask
      • Global Bid Ask Ratio
      • Global Combined Book
      • Global Bid Ask Delta
      • Global Bid Ask Ratio Increase Decrease
      • Global Bids Increase Decrease
      • Global Asks Increase Decrease
    • Open Interest
      • Open Interest
      • Open Interest Delta
      • Anchored OI Delta
    • Options
      • Bvol
      • Dvol
    • Sentiment
      • Margin Lending Ratio
      • Fear And Greed
      • User Bot Ratio
      • Premium P2P
      • Leaderboard Notional Profit
      • Leaderboard ROE Profit
      • WBTC Mint Burn
    • Liquidity
      • Liquidation
      • Liquidation Levels Count
      • Liquidation Levels Size
      • Anchored Liquidation Levels Size
      • Anchored Liquidation Levels Count
      • Liquidation Levels Trading View
      • Top Trader Average Leverage Used
      • Top Trader Average Leverage Delta
      • Top Trader Margin Used
      • Top Trader Margin Used Delta
      • Liquidation Heatmap
      • Liquidation Levels
      • Cumulative Liq Level
    • Profile Tool
      • Profiles Tool Data
    • Position Heatmap
      • Positions Heatmap Data
    • Catalog
      • Catalog
    • System
      • Health Check
      • Availability
    • Schemas
      • AnchoredCLSDResponse
      • AnchoredCLSResponse
      • AnchoredCVDResponse
      • AnchoredGlobalAccountsResponse
      • AnchoredLiqLevelsCountResponse
      • AnchoredLiqLevelsSizeResponse
      • AnchoredOIDeltaResponse
      • AnchoredTopTraderAccountsResponse
      • AnchoredTopTraderPositionsResponse
      • AnchoredWhaleRetailDeltaResponse
      • AsksIncreaseDecreaseResponse
      • BestBidAskResponse
      • BidAskDeltaResponse
      • BidAskRatioDiffResponse
      • BidAskRatioResponse
      • BidAskResponse
      • BidsAskSpreadResponse
      • BidsIncreaseDecreaseResponse
      • BotTrackerResponse
      • BuyVolumeResponse
      • BvolResponse
      • BuySellTradeCountRatioResponse
      • CatalogResponse
      • CombinedBookResponse
      • CumulativeLiqLevelResponse
      • DataAvailabilityResponse
      • DvolResponse
      • FearAndGreedResponse
      • FundingRateResponse
      • GlobalAccountsResponse
      • ExchangePremiumResponse
      • GlobalAsksIncreaseDecreaseResponse
      • GlobalBidAskDeltaResponse
      • GlobalBidAskRatioIncreaseDecreaseResponse
      • GlobalBidAskRatioResponse
      • GlobalBidAskResponse
      • GlobalBidsIncreaseDecreaseResponse
      • GlobalCombinedBookResponse
      • KlinesResponse
      • LeaderboardNotionalProfitResponse
      • LeaderboardROEProfitResponse
      • LimitOrderAverageSizeResponse
      • LimitOrderCountResponse
      • LiquidationHeatmapResponse
      • LiquidationLevelResponse
      • LimitOrderCountRatioResponse
      • LiquidationLevelsTVResponse
      • LiquidationResponse
      • MarginLendingRatioResponse
      • LiqLevelsCountResponse
      • MarketOrderAverageSizeResponse
      • LiqLevelsSizeResponse
      • MarketOrderCountResponse
      • NetLongShortDeltaResponse
      • NetLongShortResponse
      • OpenInterestDeltaResponse
      • OpenInterestResponse
      • ParticipationRatioResponse
      • MarketImbalanceIndexResponse
      • PositionHeatmapResponse
      • PremiumP2PResponse
      • MarketOrderCountRatioResponse
      • PreviousDayLevelResponse
      • PreviousMonthLevelResponse
      • PreviousWeekLevelResponse
      • ProfileToolResponse
      • SellVolumeResponse
      • SlippageResponse
      • TopTraderAccountsResponse
      • TopTraderAverageLeverageDeltaResponse
      • TopTraderAverageLeverageUsedResponse
      • TopTraderPositionsResponse
      • TraderSentimentGapResponse
      • TransferOfContractsResponse
      • TrueRetailLongShortResponse
      • UserBotRatioResponse
      • VolumeDeltaResponse
      • WBTCMintBurnResponse
      • WhalePositionDominanceResponse
      • WhaleRetailDeltaResponse
      • TopTraderMarginUsedDeltaResponse
      • ErrorResponse
      • TopTraderMarginUsedResponse
      • VolumeRatioResponse
    Terminal
    Terminal

    Authentication

    Access Token Generation (Client Credentials)#

    This guide explains how to generate an OAuth2 access token using the Client Credentials flow.
    Endpoint: POST /oauth2/token
    Base URL: https://api.hyblockcapital.com/v2
    Auth Type: Basic Auth
    Body: application/x-www-form-urlencoded
    Grant Type: client_credentials

    1) Prerequisites#

    You will need:
    1.
    API Key (x-api-key)
    2.
    OAuth client credentials
    client_id
    client_secret
    These credentials are used only for generating an access token.

    2) Token Endpoint Spec#

    Request#

    Method
    Full URL
    https://api.hyblockcapital.com/v2/oauth2/token
    Headers
    Body
    grant_type=client_credentials

    3) Generate the Basic Auth Header#

    The Authorization header must be:
    Authorization: Basic BASE64(client_id:client_secret)
    Example encoding:
    client_id:client_secret -> Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=
    Then:
    Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=

    4) cURL Example#


    5) Response Format#

    Successful response returns:
    {
      "access_token": "<token>",
      "expires_in": 84706,
      "token_type": "Bearer"
    }
    access_token: token required for all protected API endpoints
    expires_in: token TTL (seconds)
    token_type: Bearer

    6) Use Token in API Requests#

    Include both:

    7) Token Caching Strategy (Recommended)#

    Because tokens expire (expires_in), implement:
    Cache token (memory / redis)
    Refresh when:
    expired, or
    API returns 401
    Reference algorithm
    1.
    Try using cached token
    2.
    If missing/expired → request new token

    8) Common Errors#

    401 Unauthorized#

    Common reasons:
    Incorrect base64 encoding (must be client_id:client_secret)
    Incorrect credentials
    Using Bearer instead of Basic for /oauth2/token

    403 Forbidden#

    Missing/invalid x-api-key

    415 Unsupported Media Type#

    Wrong Content-Type (must be application/x-www-form-urlencoded
    Modified at 2026-01-30 06:17:40
    Next
    Orderflow
    Built with