Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Crypto
/
Crypto-auto-trading
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
2019102152 김다빈
2021-12-07 03:45:17 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dfa817486467a6f18eab13579e7cfae862eebe49
dfa81748
1 parent
86ea150d
Modify trading_notice target
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
index.js
index.js
View file @
dfa8174
...
...
@@ -12,6 +12,7 @@ const HTTPS = require('https');
const
domain
=
"2019102152.osschatbot.ga"
const
sslport
=
23023
;
const
TARGET_URL
=
'https://api.line.me/v2/bot/message/reply'
const
BROAD_TARGET_URL
=
'https://api.line.me/v2/bot/message/broadcast'
const
bodyParser
=
require
(
'body-parser'
);
const
crypto
=
require
(
'crypto'
);
const
queryEncode
=
require
(
'querystring'
).
encode
;
...
...
@@ -430,16 +431,14 @@ function trading_notice(side, price, funds, volume,yield_data=0,market="") {
messages
.
push
({
"type"
:
"text"
,
"text"
:
"매도 주문이 체결되었습니다."
});
messages
.
push
({
"type"
:
"text"
,
"text"
:
`
${
market
}
\n체결 금액 :
${
funds
}
원\n체결 수량 :
${
volume
}
개\n체결 평균가 :
${
price
}
원\n수익률 :
${
yield_data
}
%`
});
}
var
TARGET_URL
=
'https://api.line.me/v2/bot/message/push'
;
request
.
post
(
{
url
:
TARGET_URL
,
url
:
BROAD_
TARGET_URL
,
headers
:
{
'Authorization'
:
`Bearer
${
TOKEN
}
`
},
json
:
{
"to"
:
`
${
userid
}
`
,
"messages"
:
messages
}
},
(
error
,
response
,
body
)
=>
{
...
...
Please
register
or
login
to post a comment