Skip to content

Commit

Permalink
docs: update docs and CHANGELOG (cherry-picked)
Browse files Browse the repository at this point in the history
(cherry picked from commit bd7cf15)
  • Loading branch information
hallazzang authored and kingcre committed Jul 14, 2022
1 parent b5cae02 commit 4012ca1
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 45 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Client Breaking Changes

* (x/liquidity) [\#48](https://github.com/crescent-network/crescent/pull/48) Refactor `OrderBooks` query:
* `tick_precisions` field has been removed from `QueryOrderBooksRequest`
* `tick_precision` field has been removed from `OrderBookResponse` and `price_unit` has been added instead
* The order between `sells` and `buys` has been changed
* (x/farming) [\#45](https://github.com/crescent-network/crescent/pull/45) Add `HistoricalRewards` query endpoint:
* `HistoricalRewards`: `/crescent/farming/v1beta1/historical_rewards/{staking_coin_denom}`
* (x/liquidity) [\#46](https://github.com/crescent-network/crescent/pull/46) Modify `PoolResponse`:
Expand All @@ -57,6 +61,9 @@ Ref: https://keepachangelog.com/en/1.0.0/

### CLI Breaking Changes

* (x/liquidity) [\#48](https://github.com/crescent-network/crescent/pull/48) Refactor `order-books` query cmd:
* `[tick-precisions]` argument has been removed: `order-books [pair-ids]`
* Response structure has been changed
* (x/farming) [\#45](https://github.com/crescent-network/crescent/pull/45) Add `historical-rewards` query cmd:
* `historical-rewards [staking-coin-denom]`
* (x/liquidity) [\#37](https://github.com/crescent-network/crescent/pull/37) Add `create-ranged-pool` tx cmd and `order-books` query cmd:
Expand Down
152 changes: 108 additions & 44 deletions docs/api/liquidity.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ Example Request

<!-- markdown-link-check-disable -->
```bash
http://localhost:1317/crescent/liquidity/v1beta1/order_books?pair_ids=1&tick_precisions=3&num_ticks=10
http://localhost:1317/crescent/liquidity/v1beta1/order_books?pair_ids=1&num_ticks=5
```

Example Response
Expand All @@ -631,111 +631,175 @@ Example Response
"pairs": [
{
"pair_id": "1",
"base_price": "1.181500000000000000",
"base_price": "1.180000000000000000",
"order_books": [
{
"tick_precision": 3,
"buys": [
"price_unit": "0.000100000000000000",
"sells": [
{
"price": "1.181000000000000000",
"user_order_amount": "138",
"price": "1.180500000000000000",
"user_order_amount": "64712",
"pool_order_amount": "0"
},
{
"price": "1.180400000000000000",
"user_order_amount": "19985",
"pool_order_amount": "0"
},
{
"price": "1.180300000000000000",
"user_order_amount": "64725",
"pool_order_amount": "0"
},
{
"price": "1.180200000000000000",
"user_order_amount": "19993",
"pool_order_amount": "0"
},
{
"price": "1.180100000000000000",
"user_order_amount": "64738",
"pool_order_amount": "0"
}
],
"buys": [
{
"price": "1.180000000000000000",
"user_order_amount": "485",
"user_order_amount": "20000",
"pool_order_amount": "0"
},
{
"price": "1.179000000000000000",
"user_order_amount": "312",
"price": "1.179900000000000000",
"user_order_amount": "64752",
"pool_order_amount": "0"
},
{
"price": "1.178000000000000000",
"user_order_amount": "450",
"price": "1.179800000000000000",
"user_order_amount": "20009",
"pool_order_amount": "0"
},
{
"price": "1.177000000000000000",
"user_order_amount": "313",
"price": "1.179700000000000000",
"user_order_amount": "64765",
"pool_order_amount": "0"
},
{
"price": "1.176000000000000000",
"user_order_amount": "488",
"price": "1.179600000000000000",
"user_order_amount": "20017",
"pool_order_amount": "0"
}
]
},
{
"price_unit": "0.001000000000000000",
"sells": [
{
"price": "1.185000000000000000",
"user_order_amount": "421298",
"pool_order_amount": "0"
},
{
"price": "1.175000000000000000",
"user_order_amount": "313",
"price": "1.184000000000000000",
"user_order_amount": "421830",
"pool_order_amount": "0"
},
{
"price": "1.174000000000000000",
"user_order_amount": "453",
"price": "1.183000000000000000",
"user_order_amount": "422365",
"pool_order_amount": "0"
},
{
"price": "1.173000000000000000",
"user_order_amount": "314",
"price": "1.182000000000000000",
"user_order_amount": "422901",
"pool_order_amount": "0"
},
{
"price": "1.172000000000000000",
"user_order_amount": "490",
"price": "1.181000000000000000",
"user_order_amount": "423440",
"pool_order_amount": "0"
}
],
"sells": [
"buys": [
{
"price": "1.191000000000000000",
"user_order_amount": "449",
"price": "1.180000000000000000",
"user_order_amount": "20000",
"pool_order_amount": "0"
},
{
"price": "1.190000000000000000",
"user_order_amount": "309",
"price": "1.179000000000000000",
"user_order_amount": "424020",
"pool_order_amount": "0"
},
{
"price": "1.189000000000000000",
"user_order_amount": "477",
"price": "1.178000000000000000",
"user_order_amount": "424558",
"pool_order_amount": "0"
},
{
"price": "1.188000000000000000",
"user_order_amount": "310",
"price": "1.177000000000000000",
"user_order_amount": "425099",
"pool_order_amount": "0"
},
{
"price": "1.187000000000000000",
"user_order_amount": "450",
"price": "1.176000000000000000",
"user_order_amount": "425640",
"pool_order_amount": "0"
}
]
},
{
"price_unit": "0.010000000000000000",
"sells": [
{
"price": "1.230000000000000000",
"user_order_amount": "3763074",
"pool_order_amount": "0"
},
{
"price": "1.186000000000000000",
"user_order_amount": "311",
"price": "1.220000000000000000",
"user_order_amount": "4377452",
"pool_order_amount": "0"
},
{
"price": "1.185000000000000000",
"user_order_amount": "482",
"price": "1.210000000000000000",
"user_order_amount": "4106019",
"pool_order_amount": "0"
},
{
"price": "1.184000000000000000",
"user_order_amount": "311",
"price": "1.200000000000000000",
"user_order_amount": "4157434",
"pool_order_amount": "0"
},
{
"price": "1.183000000000000000",
"user_order_amount": "451",
"price": "1.190000000000000000",
"user_order_amount": "4210331",
"pool_order_amount": "0"
}
],
"buys": [
{
"price": "1.180000000000000000",
"user_order_amount": "20000",
"pool_order_amount": "0"
},
{
"price": "1.182000000000000000",
"user_order_amount": "172",
"price": "1.170000000000000000",
"user_order_amount": "4329993",
"pool_order_amount": "0"
},
{
"price": "1.160000000000000000",
"user_order_amount": "4320112",
"pool_order_amount": "0"
},
{
"price": "1.150000000000000000",
"user_order_amount": "4111940",
"pool_order_amount": "0"
},
{
"price": "1.140000000000000000",
"user_order_amount": "4430076",
"pool_order_amount": "0"
}
]
Expand Down
4 changes: 3 additions & 1 deletion docs/cli/liquidity.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,9 @@ order-books [pair-ids] [tick-precisions]
Example

```bash
crescentd order-books 1 3,4 --num-ticks=10
crescentd order-books 1 --num-ticks=10

crescentd order-books 1,2,3
```


0 comments on commit 4012ca1

Please sign in to comment.