trade_eth_roundtrip

Documentation for eth_defi.lighter.api.trade_eth_roundtrip function.

async trade_eth_roundtrip(lighter, account_index, api_private_key, api_key_index, amounts)

Open and close an ETH long on Lighter.

Parameters
  • lighter (Any) – Imported Lighter SDK module.

  • account_index (int) – Lighter account index.

  • api_private_key (str) – SDK API private key.

  • api_key_index (int) – Lighter API-key slot.

  • amounts (eth_defi.lighter.api.LighterTradeAmounts) – Trade sizing information.

Return type

None