Return to 其它功能

策略觸發時發Telegram到你的手機

Spark 可以設定在觸發策略, 交易成交, 資產淨值改變 等等情況下 自動發一個 Telegram 信息到你的手機.

只要跟著下面的方法設定便可以了:

1) Create a bot account from your telegram account
in telegram, chat with this “BotFather” account
 or go to https://telegram.me/botfather from your browser

Once inside BotFather chat room,
type (to get the user menu)
  /start

type (to create a new bot  (a robot account) )
  /newbot

type the name you want for your new bot (the name must end with ‘bot’)

after you created the bot, telegram will give you a ‘token’ for this bot in the format of 99999999:xxxxxxxxxxxxxxxxxxxxxxxxxx
<hr>


2) In your phone telegram, click the menu icon (三), click New Channel

Create a channel.
In your channel, go to subscribers, search for the bot you just created. Add it and also set it as the administrator of your channel.
You will need the token you got earlier.


3)
Find out the chat id (in the format of -9999999999) for this channel:

first use from your original telegram account, send a message to the channel,

then use a browser and enter :
https://api.telegram.org/bot[your token]/getUpdates
 e.g.
https://api.telegram.org/bot3435440:AD2NU7xBexxU/getUpdates

you might need to click this url a few times until it display something like:

ok    true
result    
0    
update_id    209734691
channel_post    
message_id    2
chat    
id    -1001291
title    “ChannelName”
type    “channel”
date    1538058686
text    “/start”
entities    
0    
offset    0
length    6
type    “bot_command”



The negative number in the id field is your needed Chat ID.

Another way is use the web version of telegram and click at your channel.
The url of your channel will appear in the browser.

https://web.telegram.org/#/im?p=c1362101291_12912633

The part in the url after im?p=c is part of your chat id.
add -100 to that part, you will get your chat id

跟著在Spark中 設定好 甚麼時候 觸發 Telegram 短訊

到喜好設定