OpenFIGI / api-examples

Examples of programs that interact with the OpenFIGI services via their APIs.
https://openfigi.com
Apache License 2.0
142 stars 51 forks source link

Non-working (possibly incomplete) examples #55

Open gitcnd opened 1 week ago

gitcnd commented 1 week ago

Nearly all the examples, at https://www.openfigi.com/api#v3-idType-values, do not work. Someone's thrown "123456789" placeholders everywhere, making it impossible to work out what format the idValue is supposed to be in. eg:-

curl 'https://api.openfigi.com/v3/mapping'     --request POST     --header 'Content-Type: application/json'     --data '[{"idType":"ID_BB","idValue":"123456789"}]'
[{"warning":"No identifier found."}]

And guessing doesn't seem to help:-

curl 'https://api.openfigi.com/v3/mapping'     --request POST     --header 'Content-Type: application/json'     --data '[{"idType":"ID_BB","idValue":"TSLA","exchCode":"US"}]'
[{"warning":"No identifier found."}]

curl 'https://api.openfigi.com/v3/mapping'     --request POST     --header 'Content-Type: application/json'     --data '[{"idType":"ID_BB","idValue":"TSLA:US","exchCode":"US"}]'
[{"warning":"No identifier found."}]

curl 'https://api.openfigi.com/v3/mapping'     --request POST     --header 'Content-Type: application/json'     --data '[{"idType":"ID_BB","idValue":"TSLA:US"}]'
[{"warning":"No identifier found."}]

and exchCode isn't in the examples?

yuxhuang commented 6 days ago

@gitcnd thank you for your feedback regarding the API documentation. It is in our radar to keep the documentation workable.

We have recently revamped this example repo and used proper search queries and mapping request to return the results. Please take a look.