I wonder if it is possible to convert the following OpenFIGI API command into python:
curl -v -X POST 'https://api.openfigi.com/v1/mapping' \ --header 'Content-Type: text/json' \ --data '[{"idType":"ID_WERTPAPIER","idValue":"851399","exchCode":"US"}]' I tried the following:
import requests data = {["idType":"ID_WERTPAPIER","idValue":"851399","exchCode":"US"]} r=requests.post('https://api.openfigi.com/v1/mapping', headers={"Content-Type": "text/json"},data=data) But r gets the value "Response [400]". According to the intro page https://www.openfigi.com/api#introduction, this identifies the scenario that "The request body is not an array". I am really new to curl, any suggestion will help.