MCPcopy Create free account
hub / github.com/ccxt/node-binance-api / prices

Method prices

src/node-binance-api.ts:3913–3917  ·  view source on GitHub ↗

* Gets the prices of a given symbol(s) * @param {string} symbol - the symbol * @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#symbol-price-ticker * @return {promise or undefined} - omitting the callback returns a promise

(symbol?: string, params: Dict = {})

Source from the content-addressed store, hash-verified

3911 * @return {promise or undefined} - omitting the callback returns a promise
3912 */
3913 async prices(symbol?: string, params: Dict = {}): Promise<{ [key: string]: number }> {
3914 if (symbol) params.symbol = symbol;
3915 const data = await this.publicSpotRequest('v3/ticker/price', params);
3916 return this.priceData(data);
3917 }
3918
3919 /**
3920 * Gets the ticker price via WebSocket API (JSON-RPC)

Callers 8

live-tests.cjsFile · 0.80
static-tests.mjsFile · 0.80
mainFunction · 0.80
example.jsFile · 0.80

Calls 2

publicSpotRequestMethod · 0.95
priceDataMethod · 0.95

Tested by

no test coverage detected