title: Translating curl to Python requests (post)
body: <p>I have a curl request in the following format</p>
  
  <pre><code>body=$(cat &lt;&lt; EOF
  {
    "order": {
      "units": "100",
      "instrument": "EUR_USD",
      "timeInForce": "FOK",
      "type": "MARKET",
      "positionFill": "DEFAULT"
    }
  }
  EOF
  )
  
  curl \
    -X POST \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer &lt;AUTHENTICATION TOKEN&gt;" \
    -d "$body" \
    "https://api-fxtrade.oanda.com/v3/accounts/&lt;ACCOUNT&gt;/orders"
  </code></pre>
  
  <p>I hope to have your help translating this into requests.post format.</p>
  
  <p>This is what I have currently, and it doesnt seem to work:</p>
  
  <pre><code>order_data = {
  "order": {
  "units": "100",
  "instrument": "EUR_USD",
  "timeInForce": "FOK",
  "type": "MARKET",
  "positionFill": "DEFAULT"
  },
  'Authorization': 'Bearer '+&lt;AUTHENTICATION TOKEN&gt;
  }
  
  requests.post('https://api-fxpractice.oanda.com/v3/accounts/&lt;ACCOUNT&gt;/orders', data = order_data)
  </code></pre>
  
  <p>I have replaced ACCOUNT and AUTHENTICATION TOKEN with actual strings.</p>
  
  <p>The part I am confused with is the body=$() line. Not too sure how to fit that into the requests format.</p>
  
  <p>Hope to have your help. Thank you.</p>