no message
This commit is contained in:
parent
16ee95d585
commit
b3826f99a5
@ -1,31 +0,0 @@
|
|||||||
import requests
|
|
||||||
import urllib.parse
|
|
||||||
import json
|
|
||||||
|
|
||||||
token = '6c7ba077eee07f6f270e219d4848700e-c-app'
|
|
||||||
base_stock_url = 'https://quote.tradeswitcher.com/quote-stock-b-api/batch-kline'
|
|
||||||
base_others_url = 'https://quote.tradeswitcher.com/quote-b-api/batch-kline'
|
|
||||||
test_headers = {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
|
|
||||||
def get_klines(type, symbols, interval):
|
|
||||||
query = {
|
|
||||||
"trace": "3baaa938-f92c-4a74-a228-fd49d5e2f8bc-1678419657806",
|
|
||||||
"data": {
|
|
||||||
"code": "AAPL.US",
|
|
||||||
"kline_type": 8,
|
|
||||||
"kline_timestamp_end": 0,
|
|
||||||
"query_kline_num": 500,
|
|
||||||
"adjust_type": 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
url = base_stock_url + f"/kline?token={token}"
|
|
||||||
print(url)
|
|
||||||
data = requests.get(url, headers=test_headers).json()
|
|
||||||
print(data)
|
|
||||||
|
|
||||||
|
|
||||||
get_klines()
|
|
||||||
Loading…
Reference in New Issue
Block a user