Skip to content

Typescript library to interact with the Fastspot API

License

Notifications You must be signed in to change notification settings

nimiq/fastspot-api

Repository files navigation

Fastspot API

Typescript library to interact with the Fastspot API

yarn add @nimiq/fastspot-api
import { init, getEstimate, SwapAsset } from '@nimiq/fastspot-api'

init('https://api.test.fastspot.io/fast/v1', '<API Key>')

// Get an estimate to buy 1000 NIM with EUR
const estimate = await getEstimate(SwapAsset.EUR, { [SwapAsset.NIM]: 1000 })