自动确认 #2914
-
|
这个软件能不能自动确认任意交易,而不仅仅确认ASF中的交易? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
|
sda难民 |
Beta Was this translation helpful? Give feedback.
-
|
You don't need a plugin, with ASF's IPC interface you can easily write yourself e.g. a bash script like the one I coded for myself: #!/usr/bin/env sh
set -eu
ASF_BOT="your_bot_name"
IPC_HOST="127.0.0.1:1242"
IPC_PASSWORD="your_ipc_password"
while :; do
clear
curl -X 'POST' "http://${IPC_HOST}/Api/Bot/${ASF_BOT}/TwoFactorAuthentication/Confirmations" -H 'accept: application/json' -H "Authentication: ${IPC_PASSWORD}" -H 'Content-Type: application/json' -d '{ "Accept": true }' -s
sleep 10
doneThis one will run in foreground and accept all confirmations every 10 seconds. You can easily change this e.g. into a cron job, or do whatever else you need, since in order to accept all confirmations you only have to send a curl request. |
Beta Was this translation helpful? Give feedback.
-
|
能不能直接在ui里设置,asf没有这个预设吗 |
Beta Was this translation helpful? Give feedback.
You don't need a plugin, with ASF's IPC interface you can easily write yourself e.g. a bash script like the one I coded for myself:
This one will run in foreground and accept all confirmations every 10 seconds. You can easily change this e.g. into a cron job, or do whatever else you need, since in order to…