OFFCHAIN-GEX

Swap VEE for items in an off-chain pool

post/v2/offchain-gex/swap/vee-for-items

Request

  • Base URL: https://api.zee-verse.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.zee-verse.com/v2/offchain-gex/swap/vee-for-items
  • Auth: HTTP bearer

Request body

itemIdstring required

The unique identifier of the item you want to buy

itemAmountstring required

Amount of items you want to buy (in wei, must be whole number). Example: "1000000000000000000" for 1 item

maxVeeAmountstring required

Maximum VEE amount you are willing to spend (in wei). Transaction fails if actual cost is more. Protects against slippage

Example request

{
  "itemId": "100",
  "itemAmount": "1000000000000000000",
  "maxVeeAmount": "25000000000000000000"
}

Response

Swap outcome

newVeeReservestring required

New VEE reserve in the pool after your swap (in wei). Shows updated pool liquidity

newItemReservestring required

New item reserve in the pool after your swap (in wei, whole number). Shows updated pool liquidity

Example response

{
  "newVeeReserve": "125510204081632653062",
  "newItemReserve": "4000000000000000000"
}

Changes

No recorded changes to this operation across all 1 revision of this API.