Longbridge Developers
Get Started

US Crypto Overview

Longbridge US Accounts

This method is only available for US data-center accounts.

Get overview data for a US crypto trading pair — all-time highs/lows, asset info, and currency details.

>_ CLI
# US crypto overview
longbridge static DOGEUSD.BKKT

Parameters

SDK method parameters.

NameTypeRequiredDescription
symbolstringYESCrypto symbol, e.g. DOGEUSD.BKKT

Request Example

from longbridge.openapi import QuoteContext, Config, OAuthBuilder

oauth = OAuthBuilder("your-client-id").build(lambda url: print("Visit:", url))
config = Config.from_oauth(oauth)
ctx = QuoteContext(config)
resp = ctx.us_crypto_overview("DOGEUSD.BKKT")
print(resp)
import asyncio
from longbridge.openapi import AsyncQuoteContext, Config, OAuthBuilder

async def main() -> None:
    oauth = await OAuthBuilder("your-client-id").build_async(lambda url: print("Visit:", url))
    config = Config.from_oauth(oauth)
    ctx = AsyncQuoteContext.create(config)
    resp = await ctx.us_crypto_overview("DOGEUSD.BKKT")
    print(resp)

if __name__ == "__main__":
    asyncio.run(main())
const { Config, QuoteContext, OAuth } = require('longbridge')

async function main() {
  const oauth = await OAuth.build('your-client-id', (_, url) => {
    console.log('Open this URL to authorize: ' + url)
  })
  const config = Config.fromOAuth(oauth)
  const ctx = QuoteContext.new(config)
  const resp = await ctx.usCryptoOverview("DOGEUSD.BKKT")
  console.log(resp)
}
main().catch(console.error)
import com.longbridge.*;
import com.longbridge.quote.*;

class Main {
    public static void main(String[] args) throws Exception {
        try (OAuth oauth = new OAuthBuilder("your-client-id").build(url -> System.out.println("Open to authorize: " + url)).get();
             Config config = Config.fromOAuth(oauth);
             QuoteContext ctx = QuoteContext.create(config)) {
            var resp = ctx.getUsCryptoOverview("DOGEUSD.BKKT").get();
            System.out.println(resp);
        }
    }
}
use std::sync::Arc;
use longbridge::{oauth::OAuthBuilder, quote::QuoteContext, Config};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("Open: {url}")).await?;
    let config = Arc::new(Config::from_oauth(oauth));
    let ctx = QuoteContext::new(config);
    let resp = ctx.us_crypto_overview("DOGEUSD.BKKT").await?;
    println!("{:?}", resp);
    Ok(())
}
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/longbridge/openapi-go/config"
	"github.com/longbridge/openapi-go/oauth"
	"github.com/longbridge/openapi-go/quote"
)

func main() {
	o := oauth.New("your-client-id").
		OnOpenURL(func(url string) { fmt.Println("Open this URL to authorize:", url) })
	if err := o.Build(context.Background()); err != nil {
		log.Fatal(err)
	}
	conf, err := config.New(config.WithOAuthClient(o))
	if err != nil {
		log.Fatal(err)
	}
	c, err := quote.NewFromCfg(conf)
	if err != nil {
		log.Fatal(err)
	}
	defer c.Close()
	resp, err := c.CryptoOverview(context.Background(), "DOGEUSD.BKKT")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", resp)
}

Response

Response Example

{
  "symbol": "DOGEUSD.BKKT",
  "name": "Dogecoin",
  "ticker": "DOGE",
  "base_asset": "DOGE",
  "currency": "USD",
  "all_time_high": "0.7376",
  "all_time_high_date": "2021-05-08",
  "all_time_low": "0.0000869",
  "all_time_low_date": "2015-05-06",
  "ipo_date": "2013-12-06",
  "issue_price": "0.00026",
  "shares": "147000000000",
  "official_web_address": "https://dogecoin.com",
  "wiki_url": "https://en.wikipedia.org/wiki/Dogecoin",
  "profile": "{...}"
}

Response Status

StatusDescriptionSchema
200SuccessCryptoOverview
400Bad requestNone

Schemas

CryptoOverview

NameTypeRequiredDescription
symbolstringtrueTrading-pair symbol (e.g. DOGEUSD.BKKT)
namestringtrueAsset name
tickerstringtrueShort ticker
base_assetstringtrueBase asset code (e.g. DOGE)
currencystringtrueQuote currency (e.g. USD)
all_time_highstringtrueAll-time high price
all_time_high_datestringtrueDate of all-time high
all_time_lowstringtrueAll-time low price
all_time_low_datestringtrueDate of all-time low
ipo_datestringfalseInitial listing date
issue_pricestringfalseInitial issue price
sharesstringfalseTotal circulating supply
official_web_addressstringfalseOfficial website URL
logostringfalseAsset logo URL
wiki_urlstringfalseWikipedia URL
profilestringfalseAsset profile description (JSON string)