Skip to content

使用策略监控币安中的币价,再发送消息到 Slack

Notifications You must be signed in to change notification settings

shipengtaov/crypto_robot

Repository files navigation

使用策略监控币安中的币价,再发送消息到 Slack

运行

具体配置修改 config.yaml

$ python -m crypto_robot.main

安装

Slack

配置 webhook:

配置 Slack Commands:

文档:

钉钉安装

  • 添加 app key/ app secret
  • app 设置 keyword
  • 开发者后台修改回调地址

文档:

DEX

The Graph

https://thegraph.com/

uniswap

https://github.com/Uniswap/v3-subgraph/blob/main/src/utils/intervalUpdates.ts 只有 tokenHourDatatokenDayData

uniswap token:sos例子: POST https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3

{
    "operationName":"tokenHourDatas",
    "variables":{"address":"0x3b484b82567a09e2588a13d54d032153f0c0aee0","startTime":1639818000,"skip":0},"query":"query tokenHourDatas($startTime: Int!, $skip: Int!, $address: Bytes!) {
  tokenHourDatas(
    first: 100
    skip: $skip
    where: {token: $address, periodStartUnix_gt: $startTime}
    orderBy: periodStartUnix
    orderDirection: asc
  ) {
    periodStartUnix
    high
    low
    open
    close
    __typename
  }
}
"}

Coingecko

Bitquery.io

{
ethereum(network: bsc){
dexTrades(options: {limit: 30, desc: "timeInterval.hour"},
# date: {since:""},
exchangeName: {in:["Pancake v2"]},
# mobox
baseCurrency: {is: "0x3203c9e46ca618c8c1ce5dc67e7e9d75f5da2377"},
# usdt
quoteCurrency: {is: "0x55d398326f99059fF775485246999027B3197955"}){
timeInterval {
hour(count: 1)
}
baseCurrency {
symbol
address
}
baseAmount
quoteCurrency {
symbol
address
}
quoteAmount
trades: count
quotePrice
maximum_price: quotePrice(calculate: maximum)
minimum_price: quotePrice(calculate: minimum)
open_price: minimum(of: block get: quote_price)
close_price: maximum(of: block get: quote_price)
}}
}

cryptocompare

Pancake

Useful links

Help

设置时区:

$ sudo timedatectl set-timezone your_time_zone

About

使用策略监控币安中的币价,再发送消息到 Slack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages