mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 16:58:08 +00:00
refactor: restructure Lighter SDK by removing deprecated Go files and enhancing Python documentation with new examples and models
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import json
|
||||
import logging
|
||||
import sys
|
||||
import time
|
||||
|
||||
logging.basicConfig(level=logging.INFO, force=True)
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) == 1:
|
||||
logging.error("No account index specified")
|
||||
return
|
||||
|
||||
account_index = sys.argv[1]
|
||||
|
||||
# Load pre-generated tokens
|
||||
with open('auth-tokens.json') as f:
|
||||
auth_tokens = json.load(f)
|
||||
|
||||
# Get current aligned timestamp (6-hour boundary)
|
||||
current_timestamp = (int(time.time()) // (6 * 3600)) * (6 * 3600)
|
||||
|
||||
# Look up token for specific account
|
||||
auth_token = auth_tokens[account_index][str(current_timestamp)]
|
||||
|
||||
print(f"{auth_token=}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user