Toggle navigation
Toggle navigation
This project
Loading...
Sign in
정홍주
/
Coin-trade-assistant
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
전현진
2021-06-07 22:51:22 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5d0033aeb593a95261b93e150ed863eda7c3deab
5d0033ae
1 parent
15600578
Delete market.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
27 deletions
market.js
market.js
deleted
100644 → 0
View file @
1560057
const
fetch
=
require
(
'node-fetch'
);
const
fs
=
require
(
'fs'
);
const
url
=
'https://api.upbit.com/v1/market/all?isDetails=false'
;
const
options
=
{
method
:
'GET'
,
headers
:
{
Accept
:
'application/json'
}};
fetch
(
url
,
options
)
.
then
(
res
=>
res
.
json
())
.
then
(
json
=>
{
var
coinName
=
[];
var
j
=
0
;
var
file
=
'coin_name.txt'
;
fs
.
open
(
file
,
'w'
,
function
(
err
,
fd
){
if
(
err
)
throw
err
;
});
for
(
i
=
0
;
i
<
json
.
length
;
i
++
)
{
if
(
json
[
i
].
market
.
indexOf
(
"KRW"
)
>-
1
){
console
.
log
(
json
[
i
].
market
);
coinName
[
j
]
=
json
[
i
].
market
;
j
=
j
+
1
;
}
}
console
.
log
(
coinName
);
fs
.
writeFile
(
file
,
coinName
,
'utf8'
,
function
(
error
){
console
.
log
(
'write end'
)
});
})
.
catch
(
err
=>
console
.
error
(
'error:'
+
err
));
\ No newline at end of file
Please
register
or
login
to post a comment