API Usage Count¶
Use your token to check the API usage count¶
Headers:
| Name | Description | Format |
|---|---|---|
| Authorization | Token, obtained after sign-in | Bearer token |
Example
When the quota is exceeded, the API returns:¶
Danger
import requests
import pandas as pd
from tqdm import tqdm
url = "https://api.finmindtrade.com/api/v4/data"
token = "" # see Login to obtain your token
headers = {"Authorization": f"Bearer {token}"}
parameter = {
"dataset": "TaiwanStockPrice",
"data_id": "2330",
"start_date": "2020-04-02",
"end_date": "2020-04-12",
}
resp = requests.get(url, headers=headers, params=parameter)
print(resp.status_code)
print(resp.json())