Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Cardona committed Sep 22, 2019
1 parent a0c2453 commit 650e4f9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13,077 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ dist/routes/**
nohup.out
slp-tx-db/
logs/
package-lock.json
#package-lock.json
yarn.lock
yarn-error.log
*.DS_Store
./**/*.DS_STORE
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@ This was created for the [2019 WyoHackathon](https://wyohackathon.io)

## Price Data

`/v1/price/details` returns a data object with 2 properties.
`/v1/price/details` returns a data object with 4 properties.

`message` is a byte sequence of 8 bytes encoded as a hex string. The first 4 bytes are the blockheight and the 2nd 4 bytes are BCH price in USDl. The price is fetched from [Bitcoin.com's price index](https://index-api.bitcoin.com/api/v0/cash/price/usd)

`signature` is the message signed by an ECPair.
- `price`: USD price in cents
- `height`: block height
- `message` is a byte sequence of 8 bytes encoded as a hex string. The first 4 bytes are the blockheight and the 2nd 4 bytes are USD price in cents. The price is fetched from [Bitcoin.com's price index](https://index-api.bitcoin.com/api/v0/cash/price/usd)
- `signature` is the message signed by an ECPair.

```
curl -X GET "http://localhost:3000/v1/price/details" -H "accept: application/json"
{
"message": "cd2c0900a8790000",
"signature": "30440220121c33f5669d328bb02de727bc742c1213ed92a96ef989cd68cbd95ec2b402d302207c562ebbd6849b7b938700e09267b158380ef0e8760e2eb4784a5cc95b984fc1"
"price": 30350,
"height": 601406,
"message": "3e2d09008e760000",
"signature": "304502210082180bc9cc4a4e41a5fe8b6c04d5c0d47d6a3174b3c0f3b7694550ad2bc72bbb02202250e01c018a760b30593ad9b71f1b6e0b0192c44183c4d38b0bdbc9f9edd3fd"
}
```

Expand Down
Loading

0 comments on commit 650e4f9

Please sign in to comment.