SDK API
Api module, method through HTTP interface query data
Go to the detailed interface documentation
// Base code block
import { GenSdk } from '@gen-io/gen-sdk';
const genSdk = new GenSdk({
apiUrl: "https://api.0xgen.io",
});
const { api } = genSdkgetGasPrice
let data = await api.getGasPrice({
chain: 'bsc'
})getTokenPrice
let data = api.getTokenPrice({
ids: 'bitcoin',
vs_currencies: 'usd'
})
getTokenList
quote
swapQuote
dex: 1inch,matcha、openocean、jupiter
slippage: 3=3%
Last updated
