具体配置修改 config.yaml
$ python -m crypto_robot.main
配置 webhook:
- Sending messages using Incoming Webhooks
- create workspace
- create app
- add feature:
Incoming Webhooks
- add
Webhook URL
配置 Slack Commands:
- Enabling interactivity with Slash Commands
- Create New Command(https://api.slack.com/apps), 设置 url;
- 验证请求是否来自 Slack(https://api.slack.com/authentication/verifying-requests-from-slack),可以直接使用python-slack-sdk;
- 查看
signing secret
: https://api.slack.com/apps
- 查看
文档:
- 添加 app key/ app secret
- app 设置 keyword
- 开发者后台修改回调地址
文档:
- 钉钉企业内部机器人:https://developers.dingtalk.com/document/app/develop-enterprise-internal-robots
- 开发者后台:https://open-dev.dingtalk.com/fe/app#/corp/robot
https://github.com/Uniswap/v3-subgraph/blob/main/src/utils/intervalUpdates.ts
只有 tokenHourData
和 tokenDayData
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
}
}
"}
- https://graphql.bitquery.io/ide
- bitquery: Uniswap OHLC data (5 minute candle , CHINU/WETH)
- bitquery: Pancake OHLC data WBNB-BUSD
- https://community.bitquery.io/t/integrating-tradingview-s-technical-analysis-charts-with-bitquery-graphql-api-using-vuejs/343
{
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)
}}
}
- https://tokens.pancakeswap.finance/pancakeswap-top-100.json
- https://tokens.pancakeswap.finance/pancakeswap-extended.json
设置时区:
$ sudo timedatectl set-timezone your_time_zone