Markets

Try swap simulation

Changed on

Order side determination:

  • When exactToken is base and source type: ask (consuming base token)
  • When exactToken is base and target type: bid (consuming quota token)
  • When exactToken is quota and source type: bid (consuming quota token)
  • When exactToken is quota and target type: ask (consuming base token)

Source type means the exactTokens parameter specifies what you're providing. Target type means the exactTokens parameter specifies what you want to receive.

post/v1/market/try-swap

Request

  • Base URL: https://testnetopenapi.hibit.app
  • URL: https://testnetopenapi.hibit.app/v1/market/try-swap
  • Auth: none declared

Request body

marketIdstring
exactTokensType0 | 1
exactTokensstring string

BigInt

side1 | 2

Order side

minOutstring string nullable

BigInt

minInstring string nullable

BigInt

Response

OK

codeinteger
messagestring nullable

Changes