// Base code block
import { GenSdk } from '@gen-io/gen-sdk';
const genSdk = new GenSdk({
apiUrl: "https://api.0xgen.io",
});
const { api } = genSdk
let data = await api.getGasPrice({
chain: 'bsc'
})
let data = api.getTokenPrice({
ids: 'bitcoin',
vs_currencies: 'usd'
})
let data=awit api.getTokenList({
chain: 'BSC',
})
let gasPrice = await api.getGasPrice({
chain: 'bsc',
})
let quoteData = await api.quote({
chain: 'bsc',
inTokenAddress: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
outTokenAddress: '0x55d398326f99059ff775485246999027b3197955',
amount: '5',
gasPrice: gasPrice.data.gasPrice,
slippage: 3,
})
let gasPrice = await api.getGasPrice({
chain: 'bsc',
})
let swapData = await swapSdk.swapQuote({
chain: 'bsc',
dex: 'openOcean',
inTokenAddress: '0x55d398326f99059ff775485246999027b3197955',
outTokenAddress: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
amount: '0.1',
gasPrice: gasPrice.data.gasPrice,
slippage: 3,
account: 'The address of your wallet',
})