How to Use
Installation
yarn add @xchainjs/xchain-midgard
Peer Dependencies
You can visit the xchain-midgard package repository to get the updated peer dependencies by looking at the "peerDependencies" object in the "package.json" file.
Example
//Imports
import { MidgardApi, Configuration, MIDGARD_API_TS_URL } from '@xchainjs/xchain-midgard'
const baseUrl = MIDGARD_API_TS_URL
const apiconfig = new Configuration({ basePath: baseUrl })
const midgardApi = new MidgardApi(apiconfig)
const data = midgardApi.getPool('BTC.BTC')
console.log(data.data)
Last updated