get_swap_min_res
Last updated
Last updated
This on-chain view returns a minimum result (output) of a swap.
Field | Type | Description |
---|---|---|
108
- pair (pool) with the specified token_id
not listed.
109
- pair doesn't have a liquidity.
113
- a Bucket contract not found (not TOK/TEZ LP pair).
117
- empty route of swaps.
118
- zero amount in was passed as the parameter.
119
- wrong route of a swap.
Field | Type | Description |
---|---|---|
direction
swap_direction_t
Swap direction: A->B or B->A
pair_id
token_id_t (nat)
ID of a pair in which swap will be executed
swaps
list(swap_slice_t)
A route of a swap
amount_in
nat
Amount of tokens to swap from