Palmy Investing API

無料
よって palmyinvesting | 更新済み 2ヶ月前 | Finance
人気

8.3 / 10

レイテンシー

1,280ms

サービスレベル

100%

Health Check

N/A

すべてのチュートリアルに戻る (3)

Python GET request

Requirements
  • Code Editor f.ex. PyCharm
  • Python Interpreter set up
  • Requests library (pip install requests)
  • An API key similar to:
    • 41176a86205a3aa668c4b30d41dbfc50bd29bdd2e5aeb6abfb02f2d8304e2f6e
GET Requests

Now we will make a request to one of the Quote endpoints:

import requests

#Keep this format and set variable_for_api_key
my_api_key = “Token {}”.format(variable_for_api_key)

#change this with the endpoint you need to call:
url = “https:/palmy-investing.com/api/earning-events/”

#prepare the headers headers = {“Authorization”: my_api_key}

#start the request
response = requests.get(url, headers=headers)

#json_response holds the data
json_response = response.json()

#You can f.ex. print it
print(json_response)