Files
ritmex-bot/docs/grvt/schemas/api_vault_invest_request.md
T

1.8 KiB

!!! info "ApiVaultInvestRequest" Request payload for investing in a vault.

This API allows a client to invest a specified amount of tokens in a particular vault.

|Name<br>`Lite`|Type|Required<br>`Default`| Description |
|-|-|-|-|
|vault_id<br>`vi` |string|True|The unique identifier of the vault to invest in.|
|currency<br>`c` |string|True|The currency used for the investment. This should be the vault's quote currency.|
|num_tokens<br>`nt` |string|True|The investment sum, in terms of the token currency specified (i.e., `numTokens` of '1000' with `tokenCurrency` of 'USDT' denotes investment of 1,000 USDT).|
|signature<br>`s` |Signature|True|The digital signature from the investing account.<br>This signature must be generated by the main account ID and is used to verify the authenticity of the request.<br>The signature must comply with AccountPermExternalTransfer permission.|
??? info "[Signature](/../../schemas/signature)"
    |Name<br>`Lite`|Type|Required<br>`Default`| Description |
    |-|-|-|-|
    |signer<br>`s` |string|True|The address (public key) of the wallet signing the payload|
    |r<br>`r` |string|True|Signature R|
    |s<br>`s1` |string|True|Signature S|
    |v<br>`v` |integer|True|Signature V|
    |expiration<br>`e` |string|True|Timestamp after which this signature expires, expressed in unix nanoseconds. Must be capped at 30 days|
    |nonce<br>`n` |integer|True|Users can randomly generate this value, used as a signature deconflicting key.<br>ie. You can send the same exact instruction twice with different nonces.<br>When the same nonce is used, the same payload will generate the same signature.<br>Our system will consider the payload a duplicate, and ignore it.|