import requests

cookies = {
    'bitget_lang': 'zh-CN',
    '_dx_kvani5r': '24e0dceb12f85d9a1279183ca29c09f772f8c61124e4eca228d8dd909c9b24b0019c2b9a',
    'OptanonAlertBoxClosed': 'Wed%20Sep%2024%202025%2017:12:32%20GMT+0800%20(%E4%B8%AD%E5%9B%BD%E6%A0%87%E5%87%86%E6%97%B6%E9%97%B4)',
    'OptanonConsent': 'isMarketing=1&isStatistic=1',
    'g_state': '{"i_l":0}',
    'theme': 'white',
    'BITGET_LOCAL_COOKIE': '{%22bitget_lang%22:%22zh-CN%22%2C%22bitget_unit%22:%22CNY%22%2C%22bitget_showasset%22:true%2C%22bitget_theme%22:%22white%22%2C%22bitget_layout%22:%22right%22%2C%22bitget_valuationunit%22:0%2C%22bitget_valuationunit_new%22:1%2C%22bitget_valuationunitandfiat%22:1%2C%22bitgt_login%22:false%2C%22theme%22:%22black%22%2C%22brand_simulation_trade%22:false%2C%22bitget_currency%22:%22%22}',
    'USD': 'CNY',
    '_gcl_au': '1.1.737358653.1759055313',
    '_ga': 'GA1.1.942322417.1759055313',
    'afUserId': '58c62981-8c6f-4601-adee-77489e65d72b-p',
    'AF_SYNC': '1759974778836',
    'bt_rtoken': 'upex:session:id:d250cc2b001c88f9e9c60a3686fd7dcf5773a666402d41b35c7a6fa3f853392d',
    'bt_uid': '619BB9EC4D4A3F9FC1AC092D38818A00',
    'bt_sessonid': '6ad2dd3f-35f3-4ef8-accb-3292ceb8b5d7',
    'bt_newsessionid': 'eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI1NTk2ZjA1MC0zOGFhLTQxMjktOTcyZS0wMWUyZDI1MWI0N2M1NzQxNTgyOTIiLCJ1aWQiOiIxV00rVjRqcTJYSVRQemdJVWhUMnNRPT0iLCJzdWIiOiJsenoqKipvbSIsImlwIjoiWGRhSGJmdHZQVGVpeFlnMmxlVmdUZz09IiwiZGlkIjoiSjBZZjQ1NkV5RUxaSGhaa2tWYnNQZTVlSFVYYUNKZS9CM21wTHJ5SHJWMTEyUklzWlFLTTVIQmtTNHlUUmhuVyIsInN0cyI6MCwiaWF0IjoxNzU5OTc0NzkwLCJleHAiOjE3NjA0MDY3OTAsInB1c2hpZCI6ImRka1NMR1VDak9Sd1pFdU1rMFlaMWc9PSIsImlzcyI6InVwZXgifQ.0SygmCSR3f5tfA0xQpdzS241nFDbsVultPm0LmleYgY',
    '_ga_Z8Q93KHR0F': 'GS2.1.s1759974680$o4$g1$t1759974795$j19$l0$h0',
    'dy_token': '68e74d44zBITZniRPCwXG8rs7bnFrrlGIHyxtKx1',
    '_cfuvid': '7C9e7Tl9zudw90jhhHGEM4H7SJnpWoi39xepaHJpJuM-1759995357475-0.0.1.1-604800000',
    '__cf_bm': 'y7VR5vFWhYBo1IWnsrX2txdXsSeztAnTxMOQjyhyuf0-1760001832-1.0.1.1-kj32unDiaucuNb8pjHeq89WUlOf.zwJW6gyN53JjOsQ8FhB1R23kpDJtzc4878CdMKYfk7xFyYUnUBEiESvziCBFUbhm3F.R0qaPyZ.dw8g',
}

headers = {
    'accept': 'application/json, text/plain, */*',
    'accept-language': 'zh-CN,zh;q=0.9,zh-HK;q=0.8,en;q=0.7',
    'baggage': 'sentry-environment=online,sentry-release=776c8c2125078b22570121601aabb051a52c0936,sentry-public_key=8aeef93d782e4ef5ae75634bfee9b590,sentry-trace_id=cb93656935cd47f289b30e55dd96f6c0',
    'cache-control': 'no-cache',
    'content-type': 'application/json;charset=UTF-8',
    'custom-token': '2facaf72193a42ab84dd879b94b57c7e',
    'deviceid': '7c88d47fdc39e5c422eff197b10d3485',
    'dy-token': '68e74d44zBITZniRPCwXG8rs7bnFrrlGIHyxtKx1',
    'language': 'zh_CN',
    'locale': 'zh_CN',
    'origin': 'https://www.bitget.com',
    'pragma': 'no-cache',
    'priority': 'u=1, i',
    'referer': 'https://www.bitget.com/zh-CN/futures/usdt/ETHUSDT',
    'sec-ch-ua': '"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-origin',
    'sentry-trace': 'cb93656935cd47f289b30e55dd96f6c0-b7272e524943c558-0',
    'terminalcode': 'cc98a9dd01af7e2d50d9b9858723b25e',
    'terminaltype': '1',
    'tm': '1760002404225',
    'uhti': 'w1760002409197066bf83bff8',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36',
    'website': 'mix',
    # 'cookie': 'bitget_lang=zh-CN; _dx_kvani5r=24e0dceb12f85d9a1279183ca29c09f772f8c61124e4eca228d8dd909c9b24b0019c2b9a; OptanonAlertBoxClosed=Wed%20Sep%2024%202025%2017:12:32%20GMT+0800%20(%E4%B8%AD%E5%9B%BD%E6%A0%87%E5%87%86%E6%97%B6%E9%97%B4); OptanonConsent=isMarketing=1&isStatistic=1; g_state={"i_l":0}; theme=white; BITGET_LOCAL_COOKIE={%22bitget_lang%22:%22zh-CN%22%2C%22bitget_unit%22:%22CNY%22%2C%22bitget_showasset%22:true%2C%22bitget_theme%22:%22white%22%2C%22bitget_layout%22:%22right%22%2C%22bitget_valuationunit%22:0%2C%22bitget_valuationunit_new%22:1%2C%22bitget_valuationunitandfiat%22:1%2C%22bitgt_login%22:false%2C%22theme%22:%22black%22%2C%22brand_simulation_trade%22:false%2C%22bitget_currency%22:%22%22}; USD=CNY; _gcl_au=1.1.737358653.1759055313; _ga=GA1.1.942322417.1759055313; afUserId=58c62981-8c6f-4601-adee-77489e65d72b-p; AF_SYNC=1759974778836; bt_rtoken=upex:session:id:d250cc2b001c88f9e9c60a3686fd7dcf5773a666402d41b35c7a6fa3f853392d; bt_uid=619BB9EC4D4A3F9FC1AC092D38818A00; bt_sessonid=6ad2dd3f-35f3-4ef8-accb-3292ceb8b5d7; bt_newsessionid=eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI1NTk2ZjA1MC0zOGFhLTQxMjktOTcyZS0wMWUyZDI1MWI0N2M1NzQxNTgyOTIiLCJ1aWQiOiIxV00rVjRqcTJYSVRQemdJVWhUMnNRPT0iLCJzdWIiOiJsenoqKipvbSIsImlwIjoiWGRhSGJmdHZQVGVpeFlnMmxlVmdUZz09IiwiZGlkIjoiSjBZZjQ1NkV5RUxaSGhaa2tWYnNQZTVlSFVYYUNKZS9CM21wTHJ5SHJWMTEyUklzWlFLTTVIQmtTNHlUUmhuVyIsInN0cyI6MCwiaWF0IjoxNzU5OTc0NzkwLCJleHAiOjE3NjA0MDY3OTAsInB1c2hpZCI6ImRka1NMR1VDak9Sd1pFdU1rMFlaMWc9PSIsImlzcyI6InVwZXgifQ.0SygmCSR3f5tfA0xQpdzS241nFDbsVultPm0LmleYgY; _ga_Z8Q93KHR0F=GS2.1.s1759974680$o4$g1$t1759974795$j19$l0$h0; dy_token=68e74d44zBITZniRPCwXG8rs7bnFrrlGIHyxtKx1; _cfuvid=7C9e7Tl9zudw90jhhHGEM4H7SJnpWoi39xepaHJpJuM-1759995357475-0.0.1.1-604800000; __cf_bm=y7VR5vFWhYBo1IWnsrX2txdXsSeztAnTxMOQjyhyuf0-1760001832-1.0.1.1-kj32unDiaucuNb8pjHeq89WUlOf.zwJW6gyN53JjOsQ8FhB1R23kpDJtzc4878CdMKYfk7xFyYUnUBEiESvziCBFUbhm3F.R0qaPyZ.dw8g',
}

json_data = {
    'startTime': 1759912500000,
    'endTime': 1760002409196,
    'symbolCode': 'ETHUSDT',
    'languageType': 1,
}

response = requests.post(
    'https://www.bitget.com/v1/trigger/strategy/tradingview/queryHistorySignals',
    cookies=cookies,
    headers=headers,
    json=json_data,
)

print(response.json())

# Note: json_data will not be serialized by requests
# exactly as it was in the original request.
# data = '{"startTime":1759912500000,"endTime":1760002409196,"symbolCode":"ETHUSDT","languageType":1}'
# response = requests.post(
#    'https://www.bitget.com/v1/trigger/strategy/tradingview/queryHistorySignals',
#    cookies=cookies,
#    headers=headers,
#    data=data,
# )
