title: Request .get how to use a string as a parameter
body: <p>I believe it may have something to do with the **kwarg param but I have no idea how to work with that, </p>
  
  <p>To specify I am trying to use the Binanace rest API to simply get the avg price for an altcoin and I can not understand how to specify which ticker to look at </p>
  
  <p>Link to the specific code I’m trying to work 
  <a href="https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#current-average-price" rel="nofollow noreferrer">https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#current-average-price</a></p>
  
  <p>Any answers would be appreciated I’m sure it will all be the same but I’m looking for the answer in python </p>
  
  <p>Code:</p>
  
  <pre><code>binance = "https://api.binance.com"
  
  print(requests.get(binance + "/api/v1/ticker/24hr", "BTC"))
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>Status code [400] 
  </code></pre>
  
  <p>Expected [BTC price avg for the last 24 hour (or any numbers really)]</p>
  
  <pre><code> "mins": 5,
   "price": "9.35751834"
   / or some equivalent 
  </code></pre>
  
  <p>But despite me trying that and failing i am unable how to understand this api for what ever reason, i used just one before so eh, </p>
  
  <p>i tried </p>
  
  <pre><code>print( binance + " /api/v3/ticker/price" )
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>Status code[200]
  
  </code></pre>
  
  <p>i understand that this is an success message but i do know know to how to access the data, </p>
  
  <p>anyhelp would be appreciated thanks </p>