Skip to content

Commit

Permalink
log prices in one line
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrtye committed Oct 31, 2024
1 parent 2bbd886 commit 19375dd
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions test/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,30 @@
tokens_pair = dict()
range_indicator = dict()

tokens_pair['21742633143463906290569050155826241533067272736897614950488156847949938836455'] = '69236923620077691027083946871148646972011131466059644796654161903044970987404'
tokens_pair['69236923620077691027083946871148646972011131466059644796654161903044970987404'] = '21742633143463906290569050155826241533067272736897614950488156847949938836455'
tokens_pair['48331043336612883890938759509493159234755048973500640148014422747788308965732'] = '87584955359245246404952128082451897287778571240979823316620093987046202296181'
tokens_pair['87584955359245246404952128082451897287778571240979823316620093987046202296181'] = '48331043336612883890938759509493159234755048973500640148014422747788308965732'
range_indicator['21742633143463906290569050155826241533067272736897614950488156847949938836455'] = "range self selected"
range_indicator['69236923620077691027083946871148646972011131466059644796654161903044970987404'] = "range self selected"
range_indicator['48331043336612883890938759509493159234755048973500640148014422747788308965732'] = "range self selected"
range_indicator['87584955359245246404952128082451897287778571240979823316620093987046202296181'] = "range self selected"
tokens_pair[
"21742633143463906290569050155826241533067272736897614950488156847949938836455"
] = "69236923620077691027083946871148646972011131466059644796654161903044970987404"
tokens_pair[
"69236923620077691027083946871148646972011131466059644796654161903044970987404"
] = "21742633143463906290569050155826241533067272736897614950488156847949938836455"
tokens_pair[
"48331043336612883890938759509493159234755048973500640148014422747788308965732"
] = "87584955359245246404952128082451897287778571240979823316620093987046202296181"
tokens_pair[
"87584955359245246404952128082451897287778571240979823316620093987046202296181"
] = "48331043336612883890938759509493159234755048973500640148014422747788308965732"
range_indicator[
"21742633143463906290569050155826241533067272736897614950488156847949938836455"
] = "range self selected"
range_indicator[
"69236923620077691027083946871148646972011131466059644796654161903044970987404"
] = "range self selected"
range_indicator[
"48331043336612883890938759509493159234755048973500640148014422747788308965732"
] = "range self selected"
range_indicator[
"87584955359245246404952128082451897287778571240979823316620093987046202296181"
] = "range self selected"

for low, high in price_range:
response = requests.get(
Expand Down Expand Up @@ -89,17 +105,15 @@ async def main():
# and event1["asks"][-1]["size"] != event2["bids"][-1]["size"]
# ):
# print("Bets mismatch")
# print(event1["asks"][-1])
# print(event2["bids"][-1])
# print(event1["asks"][-1], event2["bids"][-1])

# if (
# event1["bids"]
# and event2["asks"]
# and event1["bids"][-1]["size"] != event2["asks"][-1]["size"]
# ):
# print("Bets mismatch")
# print(event1["bids"][-1])
# print(event2["asks"][-1])
# print(event1["bids"][-1], event2["asks"][-1])

if (
event1["asks"]
Expand All @@ -115,8 +129,7 @@ async def main():
float(event1["asks"][-1]["price"])
+ float(event2["asks"][-1]["price"]),
)
print(event1["asks"][-1])
print(event2["asks"][-1])
print(event1["asks"][-1], event2["asks"][-1])

# if (
# event1["bids"]
Expand All @@ -132,8 +145,7 @@ async def main():
# float(event1["bids"][-1]["price"])
# + float(event2["bids"][-1]["price"]),
# )
# print(event1["bids"][-1])
# print(event2["bids"][-1])
# print(event1["bids"][-1], event2["bids"][-1])

checked.append(asset_id)
checked.append(pair_id)
Expand Down

0 comments on commit 19375dd

Please sign in to comment.