Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hive-js
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hive-js
Commits
79c88ca8
Commit
79c88ca8
authored
4 years ago
by
Mahdi Yari
Browse files
Options
Downloads
Patches
Plain Diff
add getTradeHistory
parent
e306e193
No related branches found
No related tags found
1 merge request
!17
update readme
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/README.md
+43
-0
43 additions, 0 deletions
doc/README.md
with
43 additions
and
0 deletions
doc/README.md
+
43
−
0
View file @
79c88ca8
...
...
@@ -720,6 +720,49 @@ Return Example:
hive_volume
:
'
7397.697 HIVE
'
,
hbd_volume
:
'
6662.316 HBD
'
}
```
### Get Trade History
Gets the trade history for a given period between a
`start`
date and an
`end`
date
```
js
hive
.
api
.
getTradeHistory
(
start
,
end
,
limit
,
callback
);
```
|Parameter|Datatype|Description|
|---------|--------|-----------|
|start|string|Datetime string in the format "2018-01-01T00:00:00"|
|end|string|Datetime string in the format "2018-01-01T00:00:00"|
|limit|number|a positive number|
|callback|function|function(err, data) {/
*code*
/}|
Call Example:
```
js
var
start
=
"
2018-01-01T00:00:00
"
;
var
end
=
"
2018-01-02T00:00:00
"
;
hive
.
api
.
getTradeHistory
(
start
,
end
,
5
,
function
(
err
,
data
)
{
console
.
log
(
err
,
data
);
});
```
Return Example:
```
js
[
{
date
:
'
2018-01-01T00:00:09
'
,
current_pays
:
'
10.192 HBD
'
,
open_pays
:
'
25.650 HIVE
'
},
{
date
:
'
2018-01-01T00:00:09
'
,
current_pays
:
'
2.000 HBD
'
,
open_pays
:
'
5.033 HIVE
'
},
{
date
:
'
2018-01-01T00:00:12
'
,
current_pays
:
'
13.560 HBD
'
,
open_pays
:
'
34.128 HIVE
'
},
{
date
:
'
2018-01-01T00:00:12
'
,
current_pays
:
'
3.057 HBD
'
,
open_pays
:
'
7.690 HIVE
'
},
{
date
:
'
2018-01-01T00:00:12
'
,
current_pays
:
'
6.908 HBD
'
,
open_pays
:
'
17.375 HIVE
'
}
]
```
### Get Hardfork Version
```
js
hive
.
api
.
getHardforkVersion
(
function
(
err
,
result
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment