API Reference

LimitOrderUpdated event emits when a limit order is created or updated. (not deleted)

struct LimitOrder {
    address trader;
    address amm;
    Side side;
    uint256 trigger;
    uint256 quoteAmount; 
    uint256 leverage;
    bool reduceOnly;
}

event LimitOrderUpdated(uint256 indexed id, address indexed amm, address indexed trader, LimitOrder order);

params

  • id order id
  • amm amm address
  • trader trader address
  • order
    • trader trader address
    • amm amm address
    • side order side (0 for long, 1 for short)
    • trigger order price
    • quoteAmount order amount (collateral)
    • leverage leverage
    • reduceOnly whether the order should only reduce position.