Skip to content

Commit

Permalink
Merge pull request #142 from OrderlyNetwork/staging
Browse files Browse the repository at this point in the history
Sprint 30 & NEAR Decomission
  • Loading branch information
dogewo2 authored Sep 23, 2024
2 parents e8cf8b7 + d13bf1f commit 7a9b001
Show file tree
Hide file tree
Showing 16 changed files with 184 additions and 561 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: evm.openapi get /v1/position_history
---
107 changes: 107 additions & 0 deletions evm.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,44 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/PositionResponse"


/v1/position_history:
get:
summary: Get Position History
deprecated: false
description: |
**Limit: 10 requests per 1 second per user**
`GET /v1/position_history`
tags:
- private
parameters:
- name: symbol
in: query
description: ""
required: false
schema:
type: string
- name: limit
in: query
description: ""
required: false
schema:
type: number
- $ref: "#/components/parameters/orderly_timestamp"
- $ref: "#/components/parameters/orderly_account_id"
- $ref: "#/components/parameters/orderly_key"
- $ref: "#/components/parameters/orderly_signature"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/PositionHistoryResponse"


/v1/funding_fee/history:
get:
summary: Get Funding Fee History
Expand Down Expand Up @@ -7148,6 +7186,75 @@ components:
items:
$ref: "#/components/schemas/Position"


PositionHistoryResponse:
allOf:
- $ref: "#/components/schemas/BasicResponse"
- type: object
required:
- data
properties:
data:
type: object
properties:
rows:
type: array
items:
type: object
properties:
position_id:
type: number
example: 1
status:
type: string
example: "closed"
type:
type: string
example: "liquidated"
symbol:
type: string
example: "PERP_ETH_USDC"
avg_open_price:
type: number
example: 61016.1
avg_close_price:
type: number
example: 61016.1
max_position_qty:
type: number
example: 56.6
close_position_qty:
type: number
example: 56.6
side:
type: string
example: "LONG"
trading_fee:
type: number
example: 0.015
accumulated_funding_fee:
type: number
example: 0.11
insurance_fund_fee:
type: number
example: 0
liquidator_fee:
type: number
example: 0
realized_pnl:
type: number
example: -9.0969192731490491
open_timestamp:
type: number
example: 1685429350571
close_timestamp:
type: number
example: 1685429350571
last_update_timestamp:
type: number
example: 1685429350571


PositionResponse:
allOf:
- $ref: "#/components/schemas/BasicResponse"
Expand Down
2 changes: 1 addition & 1 deletion introduction/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "Security"

Orderly has been audited by multiple security firms, including [Halborn](https://www.halborn.com/), [Zellic](https://www.zellic.io/), [Guardian Audits](https://guardianaudits.com/), and several independent consultants. All audit reports can be found on our [GitHub](https://github.com/OrderlyNetwork/Audits)

Trusted and incubated by WOO Network and NEAR Protocol
Trusted and incubated by WOO Network

## Governance

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ The minimum depth and max spread tables are essential for market makers to ensur
| PERP_ZRO_USDC | 0.75 | 1000 | 40 |
| PERP_TRX_USDC | 0.75 | 1000 | 40 |
| PERP_ORDER_USDC | 0.75 | 1000 | 40 |
| PERP_DOGS_USDC | 0.75 | 1000 | 40 |
| PERP_POL_USDC | 0.75 | 1000 | 40 |



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ Assume that the epoch rewards is 1,000,000 \$ORDER. The weightage of Major and A

Within each builder, every end user gets a separate Trader Score for trading with Major and Alts for each epoch.

$$ TraderScore(w)_{MajorBuilderX}=feesPaid_{MajorBuilderX}^{0.8}*[max(10,stakedORDER)]^{0.2} $$
$$ TraderScore(w)_{MajorBuilderX}=feesPaid_{MajorBuilderX}^{0.9}*[max(10,stakedORDER)]^{0.15} $$

$$ TraderScore(w)_{AltsBuilderX}=feesPaid_{AltsBuilderX}^{0.8}*[max(10,stakedORDER)]^{0.2} $$
$$ TraderScore(w)_{AltsBuilderX}=feesPaid_{AltsBuilderX}^{0.9}*[max(10,stakedORDER)]^{0.15} $$

Trader scores are calculated at the end of each epoch and are determined by (1) the total trading fees the user has paid to the builder for trading **Major / Alts** symbols and (2) their average staked balance in each epoch.

Expand Down
78 changes: 0 additions & 78 deletions introduction/trade-on-orderly/builders.mdx

Large diffs are not rendered by default.

52 changes: 0 additions & 52 deletions introduction/trade-on-orderly/fee-structure.mdx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ The funding rate is also capped and floored respectively by a `Cap Funding` and
| LDO | 0.45% | \-0.45% | 0.01% | \-0.01% |
| TRX | 0.4875% | \-0.4875% | 0.01% | \-0.01% |
| ORDER | 4.00\% | \-4.00\% | 0.02% | \-0.02% |
| DOGS | 4.00\% | \-4.00\% | 0.01% | \-0.01% |
| POL | 0.45\% | \-0.45\% | 0.01% | \-0.01% |

## Funding Period

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,62 +47,64 @@ MMR i = Max(Base MMR i, Base MMR i / Base IMR i * IMR Factor i * Abs(Position No
after launch.
</Note>

| Perp Market | Base IMR (max leverage) | Base MMR | IMR Factor |
|----------------|-------------------------|----------|--------------|
| BTC-PERP | 2% (50x) | 1.2% | 0.000000435 |
| ETH-PERP | 2% (50x) | 1.2% | 0.0000004836 |
| ARB-PERP | 10% (10x) | 5% | 0.0000021481 |
| WOO-PERP | 10% (10x) | 5% | 0.0000077523 |
| LINK-PERP | 10% (10x) | 5% | 0.0000018182 |
| OP-PERP | 10% (10x) | 5% | 0.0000021481 |
| SOL-PERP | 10% (10x) | 5% | 0.0000012291 |
| SUI-PERP | 10% (10x) | 5% | 0.0000025564 |
| TIA-PERP | 10% (10x) | 5% | 0.0000116025 |
| INJ-PERP | 10% (10x) | 5% | 0.0000021481 |
| AVAX-PERP | 10% (10x) | 5% | 0.0000018182 |
| JUP-PERP | 10% (10x) | 5% | 0.0000103131 |
| ORDI-PERP | 10% (10x) | 5% | 0.0000041315 |
| APT-PERP | 10% (10x) | 5% | 0.0000013796 |
| BLUR-PERP | 10% (10x) | 5% | 0.0000116025 |
| WLD-PERP | 10% (10x) | 5% | 0.00000731 |
| STRK-PERP | 10% (10x) | 5% | 0.00000145 |
| SEI-PERP | 10% (10x) | 5% | 0.0000018182 |
| DYM-PERP | 10% (10x) | 5% | 0.0000103131 |
| ETHFI-PERP | 10% (10x) | 5% | 0.0000175 |
| FTM-PERP | 10% (10x) | 5% | 0.00000247 |
| ENA-PERP | 10% (10x) | 5% | 0.00001462 |
| W-PERP | 10% (10x) | 5% | 0.0000020086 |
| WIF-PERP | 10% (10x) | 5% | 0.0000097705 |
| ZEUS-PERP | 10% (10x) | 5% | 0.00000714 |
| OMNI-PERP | 10% (10x) | 5% | 0.00001428 |
| MERL-PERP | 10% (10x) | 5% | 0.00001428 |
| ONDO-PERP | 10% (10x) | 5% | 0.0000084382 |
| REZ-PERP | 10% (10x) | 5% | 0.00001428 |
| AR-PERP | 10% (10x) | 5% | 0.0000077523 |
| FIL-PERP | 10% (10x) | 5% | 0.0000013796 |
| NOT-PERP | 10% (10x) | 5% | 0.0000013796 |
| MEW-PERP | 10% (10x) | 5% | 0.00000884 |
| BOME-PERP | 10% (10x) | 5% | 0.0000084382 |
| 1000PEPE-PERP | 10% (10x) | 5% | 0.0000033766 |
| 1000BONK-PERP | 10% (10x) | 5% | 0.00000714 |
| TON-PERP | 10% (10x) | 2.5% | 0.0000085963 |
| 1000FLOKI-PERP | 10% (10x) | 5% | 0.0000041315 |
| STG-PERP | 10% (10x) | 5% | 0.00000731 |
| PEOPLE-PERP | 10% (10x) | 5% | 0.0.00000731 |
| BRETT-PERP | 10% (10x) | 5% | 0.000007532 |
| CHZ-PERP | 10% (10x) | 5% | 0.0000077523 |
| IO-PERP | 10% (10x) | 5% | 0.00000714 |
| ZK-PERP | 10% (10x) | 5% | 0.0000083543 |
| PONKE-PERP | 10% (10x) | 5% | 0.00000884 |
| ZRO-PERP | 10% (10x) | 5% | 0.000009282 |
| BLAST-PERP | 10% (10x) | 5% | 0.0000051567 |
| POPCAT-PERP | 10% (10x) | 5% | 0.0000075320 |
| MKR-PERP | 10% (10x) | 5% | 0.0000035767 |
| AAVE-PERP | 10% (10x) | 5% | 0.0000046867 |
| CRV-PERP | 10% (10x) | 5% | 0.0000084 |
| LDO-PERP | 10% (10x) | 5% | 0.0000021481 |
| TRX-PERP | 10% (10x) | 5% | 0.0000032218 |
| ORDER-PERP | 10% (10x) | 5% | 0.0000092820 |
| Perp Market | Base IMR (max leverage) | Base MMR | IMR Factor |
|----------------|-------------------------|----------|---------------|
| BTC-PERP | 2% (50x) | 1.2% | 0.000000435 |
| ETH-PERP | 2% (50x) | 1.2% | 0.0000004836 |
| ARB-PERP | 10% (10x) | 5% | 0.0000021481 |
| WOO-PERP | 10% (10x) | 5% | 0.0000077523 |
| LINK-PERP | 10% (10x) | 5% | 0.0000018182 |
| OP-PERP | 10% (10x) | 5% | 0.0000021481 |
| SOL-PERP | 10% (10x) | 5% | 0.0000012291 |
| SUI-PERP | 10% (10x) | 5% | 0.0000025564 |
| TIA-PERP | 10% (10x) | 5% | 0.0000116025 |
| INJ-PERP | 10% (10x) | 5% | 0.0000021481 |
| AVAX-PERP | 10% (10x) | 5% | 0.0000018182 |
| JUP-PERP | 10% (10x) | 5% | 0.0000103131 |
| ORDI-PERP | 10% (10x) | 5% | 0.0000041315 |
| APT-PERP | 10% (10x) | 5% | 0.0000013796 |
| BLUR-PERP | 10% (10x) | 5% | 0.0000116025 |
| WLD-PERP | 10% (10x) | 5% | 0.00000731 |
| STRK-PERP | 10% (10x) | 5% | 0.00000145 |
| SEI-PERP | 10% (10x) | 5% | 0.0000018182 |
| DYM-PERP | 10% (10x) | 5% | 0.0000103131 |
| ETHFI-PERP | 10% (10x) | 5% | 0.0000175 |
| FTM-PERP | 10% (10x) | 5% | 0.00000247 |
| ENA-PERP | 10% (10x) | 5% | 0.00001462 |
| W-PERP | 10% (10x) | 5% | 0.0000020086 |
| WIF-PERP | 10% (10x) | 5% | 0.0000097705 |
| ZEUS-PERP | 10% (10x) | 5% | 0.00000714 |
| OMNI-PERP | 10% (10x) | 5% | 0.00001428 |
| MERL-PERP | 10% (10x) | 5% | 0.00001428 |
| ONDO-PERP | 10% (10x) | 5% | 0.0000084382 |
| REZ-PERP | 10% (10x) | 5% | 0.00001428 |
| AR-PERP | 10% (10x) | 5% | 0.0000077523 |
| FIL-PERP | 10% (10x) | 5% | 0.0000013796 |
| NOT-PERP | 10% (10x) | 5% | 0.0000013796 |
| MEW-PERP | 10% (10x) | 5% | 0.00000884 |
| BOME-PERP | 10% (10x) | 5% | 0.0000084382 |
| 1000PEPE-PERP | 10% (10x) | 5% | 0.0000033766 |
| 1000BONK-PERP | 10% (10x) | 5% | 0.00000714 |
| TON-PERP | 10% (10x) | 2.5% | 0.0000085963 |
| 1000FLOKI-PERP | 10% (10x) | 5% | 0.0000041315 |
| STG-PERP | 10% (10x) | 5% | 0.00000731 |
| PEOPLE-PERP | 10% (10x) | 5% | 0.0.00000731 |
| BRETT-PERP | 10% (10x) | 5% | 0.000007532 |
| CHZ-PERP | 10% (10x) | 5% | 0.0000077523 |
| IO-PERP | 10% (10x) | 5% | 0.00000714 |
| ZK-PERP | 10% (10x) | 5% | 0.0000083543 |
| PONKE-PERP | 10% (10x) | 5% | 0.00000884 |
| ZRO-PERP | 10% (10x) | 5% | 0.000009282 |
| BLAST-PERP | 10% (10x) | 5% | 0.0000051567 |
| POPCAT-PERP | 10% (10x) | 5% | 0.0000075320 |
| MKR-PERP | 10% (10x) | 5% | 0.0000035767 |
| AAVE-PERP | 10% (10x) | 5% | 0.0000046867 |
| CRV-PERP | 10% (10x) | 5% | 0.0000084 |
| LDO-PERP | 10% (10x) | 5% | 0.0000021481 |
| TRX-PERP | 10% (10x) | 5% | 0.0000032218 |
| ORDER-PERP | 10% (10x) | 5% | 0.0000092820 |
| DOGS-PERP | 10% (10x) | 5% | 0.0000075320 |
| POL-PERP | 5% (20x) | 2.5% | 0.0000019314 |



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ The relevant exchanges for each trading pair can be find in the following table
| LDO | X | X | X | X | X | X | X | |
| TRX | X | X | X | X | X | X | X | |
| ORDER | | | X | X | X | X | X | X |
| DOGS | X | X | | | X | X | X | X |
| POL | | X | | X | X | X | X | X |



Expand Down
2 changes: 0 additions & 2 deletions introduction/trade-on-orderly/supported-chains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ All contract addresses and details [here](/build-on-evm/addresses)
### Non-EVM Chains

All contract addresses and details [here](/build-on-evm/addresses)

- NEAR Protocol
Loading

0 comments on commit 7a9b001

Please sign in to comment.