Skip to main content

IChromaticTradeCallback.sol

IChromaticTradeCallback

The interface for handling callbacks related to Chromatic trading operations.

openPositionCallback

function openPositionCallback(address settlementToken, address vault, uint256 marginRequired, bytes data) external

Callback function called after opening a position.

  • Parameters:

    NameTypeDescription
    settlementTokenaddressThe address of the settlement token used in the position.
    vaultaddressThe address of the vault contract.
    marginRequireduint256The amount of margin required for the position.
    databytesAdditional data related to the callback.

claimPositionCallback

function claimPositionCallback(struct Position position, struct ClaimPositionInfo claimInfo, bytes data) external

Callback function called after claiming a position.

  • Parameters:

    NameTypeDescription
    positionstruct PositionThe claimed position.
    claimInfostruct ClaimPositionInfoThe pnl related information of the claim
    databytesAdditional data related to the callback.