title: Binance API proper way to open a futures trade?
body: <p>I am currently in the midst of writing myself a little python bot for binance using their API and I find the documentation rather lackluster and wondered whether someone on here might be able to help.</p>
  <p>Let's say I want to open up a futures trade in the BTCUSDT pairing with a leverage of 5x and a margin of 100 USDT at market price, with a take profit at 50% and a stop loss at 10%.</p>
  <pre><code>from binance.client import Client
  import cfg
  client = Client(cfg.api_key, cfg.api_secret)
  client.futures_create_order(symbol='BNBUSDT', side='LONG', type='MARKET',  quantity = 100 USDT * leverage / asset_price)
  </code></pre>
  <p>This is about as far as I get. I don't see any leverage attribute, however there is another function called
  <code>futures_change_leverage()</code>
  which is able to change your leverage, so I do have to initialize a position and then change the leverage? Wouldn't that also just scale my margin down?</p>
  <p>I am also rather lost as to how the later attributes work and how I would be able to place a take profit and stop loss order.</p>
  <p>Thanks for any help.</p>