CFD Leverage in API

Discussion in 'Trading' started by majo, May 1, 2021.

  1. majo

    majo

    hi, does anyone has an example how to define CFD with leverage in any language ? (using TWS API)
     
  2. majo

    majo

    hi, thank you. this is working for me, however i am not sure which one of the parameters is the leverage or how do i specify the leverage. Maybe i am missing something obvious here...
    My contract definition
    sectype="CFD"
    contract=Contract()
    contract.symbol=symbol
    contract.secType=sectype
    contract.currency=currency
    contract.exchange=exchange
    contract.multiplier=???
     
  3. blink18

    blink18

    There is no multiplier with CFDs, it's always 1:1. CFDs are like buying stocks/index on margin (you don't own the asset - futures analogy) without expiration and rollover, and you always trade against broker as market maker.