Skip to main content
POST
Build operate instructions

Authorizations

x-api-key
string
header
required

Query Parameters

market
enum<string>
default:main

Lend market identifier. Defaults to main.

Available options:
main,
ethena

Body

application/json

Request body validated by operateValidator in app/validators/borrowing.ts.

vaultId
integer
required

Target vault id.

Example:

1

positionId
integer
required

Existing position id. Use 0 when opening a new position.

Example:

0

signer
string
required

Transaction fee payer and signer wallet address.

Example:

"4AwWnVxWKdZCZ8zVGdD7S3EwzRHkVRiXJxQKzwjbBayj"

colAmount
string
required

Collateral delta in supply-token base units. Positive deposits collateral, negative withdraws. Use -170141183460469231731687303715884105728 (MIN_I128) to withdraw all collateral.

Pattern: ^-?[0-9]+$
Example:

"10000"

debtAmount
string
required

Debt delta in borrow-token base units. Positive borrows, negative repays. Use -170141183460469231731687303715884105728 (MIN_I128) to repay all debt.

Pattern: ^-?[0-9]+$
Example:

"100"

positionOwner
string

Optional position owner when operating on behalf of another wallet.

Example:

"4AwWnVxWKdZCZ8zVGdD7S3EwzRHkVRiXJxQKzwjbBayj"

Response

200 - application/json

Operate instructions

nftId
integer
required
instructions
object[]
required
addressLookupTableAddresses
string[]
required