Mint LP
Mints specified amount of LP tokens.
Rate limits
With spot leverage: 60 mint/min or 10 mints every 10 seconds per wallet. (weight = 10)
Without spot leverage: 30 mints/min or 5 mints every 10 seconds per wallet. (weight=20)
See more details in API Rate limits.
Request
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
tx | object | Yes | Mint LP transaction object. See Signing section for details on the transaction fields. |
tx.sender | string | Yes | Hex string representing the subaccount's 32 bytes (address + subaccount name) of the tx sender. |
tx.productId | number | Yes | A product ID to mint LP for. |
tx.amountBase | string | Yes | This is the amount of base to be consumed by minting LPs multiplied by 1e18, sent as a string. |
tx.quoteAmountLow | string | Yes | This is the minimum amount of quote to be consumed by minting LPs multiplied by 1e18, sent as a string. |
tx.quoteAmountHigh | string | Yes | This is the maximum amount of quote to be consumed by minting LPs multiplied by 1e18, sent as a string. |
tx.nonce | string | Yes | This is an incrementing nonce, can be obtained using the Nonces query. |
signature | string | Yes | Hex string representing hash of the signed transaction. See Signing section for more details. |
spot_leverage | boolean | No | Indicates whether leverage should be used; when set to |
Signing
See more details and examples in our signing page.
The solidity typed data struct that needs to be signed is:
sender
: a bytes32
sent as a hex string; includes the address and the subaccount identifier.
productId
: a uint32
that specifies the product youโd like to mint LPs for; can be either a spot or a perp product.
amountBase
: this is the amount of base to be consumed by minting LPs, sent as a string. This must be positive and must be specified with 18 decimals.
quoteAmountLow
: this is the minimum amount of quote to be consumed by minting LPs, sent as a string. This must be positive and must be specified with 18 decimals.
quoteAmountHigh
: this is the maximum amount of quote to be consumed by minting LPs, sent as a string. This must be positive and must be specified with 18 decimals.
nonce
: the tx_nonce
. This is an incrementing nonce, can be obtained using the Nonces query.
Note: for signing you should always use the data type specified in the solidity struct which might be different from the type sent in the request e.g: nonce
should be an uint64
for Signing but should be sent as a string
in the final payload.
Response
Success
Failure
Last updated