POST Cancel settlement

Cancels the settlement request and unpause the market maker's trading activities.

POSThttps://newapi.native.org/lend/v1/lend/cancel-settlement
Header parameters
Body
chain*enum

Native blockchain name, eg: ethereum, bsc, etc

Example: "ethereum"
ethereumbscbsc_testnetsepoliapolygonmumbaiarbitrumavalanchemantlezetachain_athens3basemantascrollzetachainlineazklinkmorph_testnetmorph_holesky_testnetmantle_sepolia_testnetpolygon_amoy_testnetavalanche_fuji_testnetberachain_bartio_testnet
recipient*string

The address of the market maker or the settler

Pattern: ^0x[a-fA-F0-9]{40}$
positionUpdates*array of TokenAmount (object)

The position updates for the settlement

trader*string

The address of the trader

Pattern: ^0x[a-fA-F0-9]{40}$
Response

Success

Body
success*string
Request
const response = await fetch('https://newapi.native.org/lend/v1/lend/cancel-settlement', {
    method: 'POST',
    headers: {
      "apiKey": "text",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "chain": "ethereum",
      "recipient": "text",
      "positionUpdates": [
        {
          "tokenAddress": "text",
          "amount": "text"
        }
      ],
      "trader": "text"
    }),
});
const data = await response.json();
Response
{
  "success": "text"
}

Example response

{
    "status": "success",
    "id": "b9292014-1e85-43e8-a635-8a4f1c5423b9"
}

Error responses

{
    "statusCode": 400,
    "message": "Settlement request not found",
    "error": "Bad Request"
}

Last updated