Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 627 Bytes

File metadata and controls

23 lines (19 loc) · 627 Bytes

HTTPS Agent Configuration

import ssl

from binance_common.configuration import ConfigurationRestAPI
from binance_sdk_rebate.rebate import Rebate
from binance_sdk_rebate.rest_api.models import GetSpotRebateHistoryRecordsResponse

configuration = ConfigurationRestAPI(
    api_key="your-api-key",
    api_secret="your-api-secret",
    https_agent=ssl.create_default_context()
)
client = Rebate(config_rest_api=configuration)

try:
    response = client.rest_api.get_spot_rebate_history_records()
    data: GetSpotRebateHistoryRecordsResponse = response.data()
    print(data)
except Exception as e:
    print(e)