Skip to content

Instantly share code, notes, and snippets.

@xeroc
Created April 10, 2018 14:44
Show Gist options
  • Save xeroc/689170bbd07fda811786775fb96748e8 to your computer and use it in GitHub Desktop.
Save xeroc/689170bbd07fda811786775fb96748e8 to your computer and use it in GitHub Desktop.
from datetime import datetime
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
from bitshares.account import Account
ip = "176.9.44.67"
account = Account("xeroc")
account_id = account["id"]
es = Elasticsearch(ip, timeout=60)
s = Search(using=es, index="graphene-*") \
.query("match", account_history__account=account_id) \
.query("match", operation_type=1) \
response = s.execute()
print(s.count())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment