GithubHelp home page GithubHelp logo

ccxt market id about ccxws HOT 2 CLOSED

altangent avatar altangent commented on May 22, 2024
ccxt market id

from ccxws.

Comments (2)

bmancini55 avatar bmancini55 commented on May 22, 2024

Hi, thanks for submitting an issue.

It looks like you are using an incorrect id for your market. CCXWS markets use the results of a call to CCXT fetchMarket. These results have an id property that is the remote exchange's identifier. CCXT does the work of normalizing the base and quote symbols across all exchanges.

Kraken is a good example. On that exchange, Bitcoin is XXBT and the BTC/USD market looks like:

{
    id: 'XXBTZUSD',  
    symbol: 'BTC/USD',
    base: 'BTC',
    quote: 'USD',
    baseId: 'XXBT',
    quoteId: 'ZUSD',
}
  • id is the remote identifier the exchange is expected
  • base is the normalized base symbol
  • quote is the normalized quote symbol
  • symbol is the concatenation of normalized base and quote symbols
  • baseId is the base symbol used by the exchange
  • quoteId is the quote symbol used by the exchange

It's not obvious that this is the case with Bibox because most markets are already using a symbol that is normalized.

For example, BTC/USDT on Bibox looks like

{
    id: 'BTC_USDT',
    symbol: 'BTC/USDT',
    base: 'BTC',
    quote: 'USDT',
    baseId: 'BTC',
    quoteId: 'USDT',
}

Hopefully that answers you question.

from ccxws.

ais-one avatar ais-one commented on May 22, 2024

I see, I usually pass in the symbol when calling the ccxt APIs. Will close this and handle accordingly...

from ccxws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.