getExchangeInfo
All exchange info including market pairs will be provided through this method:
import { Nectar } from "@wasd3rplay/nectar-sdk";
const nectar = new Nectar();
const marketList = await nectar.getExchangeInfo();Result
The result of this method is a list of markets:
e.g.
[
{
base_ticker: 'ETH_ETH',
base_ticker_display: 'ETH',
base_ticker_address: '0x0000000000000000000000000000000000000000',
base_ticker_precision: 18,
base_ticker_decimal_places: 6,
base_ticker_icon_url: 'https://cdn.wasd3r.dev/token-icons/ETH.png',
quote_ticker: 'USDT_ETH',
quote_ticker_display: 'USDT',
quote_ticker_address: '0x861A5E2261E4C783f8e1ec99cbc7EF9d677E2313',
quote_ticker_precision: 6,
quote_ticker_decimal_places: 6,
quote_ticker_icon_url: 'https://cdn.wasd3r.dev/token-icons/USDT_ETH.png',
symbol: 'ETH_ETH:USDT_ETH',
min_quote_amount: '1000000',
chain: {
id: 'og4j9y2pkw5n63p7',
type: 0,
chainid: 11155111,
rpcurl: 'https://sepolia.infura.io/v3/018da52b2d7344eab13d20abbe08f945',
project_name: 'Ethereum Sepolia Testnet',
entry_point_contract: '0x3E73081895A1C48adCa177DAAF1A33054Ea69D5D',
dex_manager_contract: '0x187827316E9Fb826823d2ad85221e652DEdCB097'
}
},
...
]base_tickerThe base token of the market to buy or sell
The ticker expression is a combination of token symbol, an underscore('_'), and the blockchain (network) symbol. So, the above example shows that the base token is the token with the symbol
ETHprovided by Ethereum (ETH) network.
base_ticker_displayHow to display the base token in the UI
base_ticker_addressThe contract address of the base token
If the base token is native like
ETH, the contract address will be zero address (0x0000000000000000000000000000000000000000)
base_ticker_precisionHow many decimal places are supported for the base currency unit of the base token
base_ticker_decimal_placesHow many decimal places will be displayed in the UI for the above maximum decimal places, which is specified by
base_ticker_precision
base_ticker_icon_urlThe icon image URL of the base token
quote_tickerThe quote token of the market used to buy or sell the base token as the currency
The ticker expression is a combination of token symbol, an underscore('_'), and the blockchain (network) symbol. So, the above example shows that the quote token is the token with the symbol
USDTprovided by Ethereum (ETH) network.
quote_ticker_displayHow to display the quote token in the UI
quote_ticker_addressThe contract address of the quote token
If the quote token is native like
ETH, the contract address will be zero address (0x0000000000000000000000000000000000000000)
quote_ticker_precisionHow many decimal places are supported for the base currency unit of the quote token
quote_ticker_decimal_placesHow many decimal places will be displayed in the UI for the above maximum decimal places, which is specified by
quote_ticker_precision
quote_ticker_icon_urlThe icon image URL of the quote token
symbolThe market symbol
The symbol expression is a combination of
base_ticker, a colon (':'), andquote_ticker.
min_quote_amountMinimum order amount
chainThe base and quote tokens in the market are on the same blockchain network. This value provides information about the blockchain network of the market.
idThe unique value of the this chain information provided by Nectar
typeThe smart contract engine type compatible with the blockchain
Currently,
EVMis the only type.
chainidThe chain ID provided by the blockchain
rpcurlThe RPC URL for connecting to the blockchain
project_nameThe blockchain name and/or description
entry_point_contractThe contract address of the entry point on the blockchain network
dex_manager_contractThe contract address of the dex manager on the blockchain network