/createTrigger
/createTrigger
Request
Body Params application/json
payloadSignature
string
required
Signature of the payload.
>= 1 characters
payload
object {6}
required
ownerAddr
string
required
The owner address of the position; must be a checksum address.
>= 1 characters
chainId
number
required
The chain id of the network. Must be one of the chains supported by Aperture.
Allowed values:
1421615421613
Example:
1
nftId
string
required
The nonfungible token id of the position.
>= 1 characters
action
oneOf {4}
oneOf, must be valid against exactly one of the subschemas
condition
oneOf {4}
oneOf, must be valid against exactly one of the subschemas
expiration
integer
required
Unix timestamp in seconds when this trigger expires.
> 0
permitInfo
object {2}
optional
If Aperture doesn't already have authority over the position, then permitInfo
should be obtained from the user and populated here.
signature
string
required
A raw signature of the ERC-712 typed message described in ERC-4494; the signature can be generated, for example, by https://docs.ethers.org/v5/api/signer/#Signer-signTypedData.
>= 1 characters
deadline
string
required
Unix timestamp in seconds indicating deadline for the signed "permit".
>= 1 characters
Example
{
"payloadSignature": "string",
"payload": {
"ownerAddr": "string",
"chainId": 1,
"nftId": "string",
"action": {
"type": "Close",
"slippage": 0,
"maxGasProportion": 1
},
"condition": {
"type": "Time",
"timeAfterEpochSec": 1
},
"expiration": 1
},
"permitInfo": {
"signature": "string",
"deadline": "string"
}
}
Request samples
Responses
Trigger created successfully.(200)
Bad Request(400)
Internal Server Error(500)
Trigger created successfully.
HTTP Code: 200
Content Type : JSON
Data Schema
object {0}
Example
{}
Modified at 10 months ago