Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion run_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ fi
directory="trader"
# This is a tested version that works well.
# Feel free to replace this with a different version of the repo, but be careful as there might be breaking changes
service_version="v0.6.0"
service_version="v0.6.0.post1"
service_repo=https://github.com/valory-xyz/$directory.git
if [ -d $directory ]
then
Expand Down
8 changes: 6 additions & 2 deletions trades.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
QUERY_BATCH_SIZE = 1000
DUST_THRESHOLD = 10000000000000
INVALID_ANSWER = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FPMM_CREATOR = "0x89c5cc945dd550bcffb72fe42bff002429f46fec"

headers = {
"Accept": "application/json, multipart/mixed",
Expand All @@ -43,7 +44,7 @@
"""
{
fpmmTrades(
where: {type: Buy, creator: "${creator}"}
where: {type: Buy, creator: "${creator}" fpmm_: {creator: "${fpmm_creator}"} }
first: ${first}
skip: ${skip}
orderBy: creationTimestamp
Expand Down Expand Up @@ -168,7 +169,10 @@ def _query_omen_xdai_subgraph() -> dict[str, Any]:
skip = 0
while True:
query = omen_xdai_trades_query.substitute(
creator=creator.lower(), first=QUERY_BATCH_SIZE, skip=skip
creator=creator.lower(),
fpmm_creator=FPMM_CREATOR.lower(),
first=QUERY_BATCH_SIZE,
skip=skip
)
content_json = _to_content(query)
res = requests.post(url, headers=headers, json=content_json)
Expand Down