# Table of Contents - [What Is Reya | Reya](#what-is-reya-reya) - [Why Reya Exists | Reya](#why-reya-exists-reya) - [Who Is Behind Reya | Reya](#who-is-behind-reya-reya) - [Architecture (at a glance) | Reya](#architecture-at-a-glance-reya) - [Reya Roadmap | Reya](#reya-roadmap-reya) - [How Reya Is Different | Reya](#how-reya-is-different-reya) - [Perpetual Futures | Reya](#perpetual-futures-reya) - [Derivatives Clearing | Reya](#derivatives-clearing-reya) - [Margin System | Reya](#margin-system-reya) - [Cross-margining | Reya](#cross-margining-reya) - [Cross-collateralization | Reya](#cross-collateralization-reya) - [Smart Contract Withdrawals | Developers | Reya](#smart-contract-withdrawals-developers-reya) - [Rest API Reference | Developers | Reya](#rest-api-reference-developers-reya) - [Haircuts | Reya](#haircuts-reya) - [Specs | Developers | Reya](#specs-developers-reya) - [Auto-exchange conditions | Reya](#auto-exchange-conditions-reya) - [Signatures and Nonces | Developers | Reya](#signatures-and-nonces-developers-reya) - [Rate Limits | Developers | Reya](#rate-limits-developers-reya) - [Reference Data | Developers | Reya](#reference-data-developers-reya) - [Dutch auction | Reya](#dutch-auction-reya) - [Auto-exchange mechanism | Reya](#auto-exchange-mechanism-reya) - [Insurance Funds | Reya](#insurance-funds-reya) - [Allocation & Release Schedule | Reya](#allocation-release-schedule-reya) - [Backstop LPs | Reya](#backstop-lps-reya) - [Wallet Data | Developers | Reya](#wallet-data-developers-reya) - [Models | Developers | Reya](#models-developers-reya) - [Token Design | Reya](#token-design-reya) - [Governance | Reya](#governance-reya) - [Context | Reya](#context-reya) - [Monetary Policy | Reya](#monetary-policy-reya) - [sREYA Additional Utility | Reya](#sreya-additional-utility-reya) - [Reya Chain Points: FAQs | Reya](#reya-chain-points-faqs-reya) - [Introduction | Reya](#introduction-reya) - [FAQs | Reya](#faqs-reya) - [Ranked liquidations | Reya](#ranked-liquidations-reya) - [Network Security and Economic Incentives | Reya](#network-security-and-economic-incentives-reya) - [Liquidation Engine | Reya](#liquidation-engine-reya) - [Introduction | Reya](#introduction-reya) - [Order Entry | Developers | Reya](#order-entry-developers-reya) - [Audits | Reya](#audits-reya) - [srUSD | Reya](#srusd-reya) - [Market Data | Developers | Reya](#market-data-developers-reya) - [Websocket API Reference | Developers | Reya](#websocket-api-reference-developers-reya) - [Reya DEX REST API v2 | Reya](#reya-dex-rest-api-v2-reya) - [Auto-exchange and Liquidations | Reya](#auto-exchange-and-liquidations-reya) - [Rate Limits | Reya](#rate-limits-reya) - [Reya DEX | Reya](#reya-dex-reya) --- # What Is Reya | Reya Reya is a breakthrough high-performance onchain exchange that delivers institutional grade execution, whilst delivering superior speed, security and reliability guarantees to users. Reya achieves this as **a novel trading-specific based Zk rollup on Ethereum.** This design gives users superior: * Speed: <1ms trade execution * Security: verifiable order execution and settlement, via zk-proofs, with executed trades settling on Ethereum * Reliability: no single point of failure, with the rollup design having multiple rotating L2 nodes (unlike generation-1 rollups) The based-design also makes Reya synchronously composable with all of Ethereum L1 DeFi, unlocking novel use cases for traders and builders. No sidecar. No Alt-L1. Instead, a DEX enshrined into the Ethereum L1. [NextWhy Reya Existschevron-right](https://docs.reya.xyz/get-started/why-reya-exists) Last updated 2 months ago --- # Why Reya Exists | Reya Global Capital Markets are moving onchain to Ethereum because it is credibly neutral, has never had downtime and has the economic security capable of supporting the world’s financial system. However, Ethereum isn’t fast enough to support trading - it wasn’t built for it. Meanwhile, attempts to build fast onchain trading environments have led teams to centralize parts of the trading system. This creates security, reliability and neutrality concerns for a system designed to be global. These concerns are in direct conflict with the benefits Ethereum provides, and why it has been chosen as the chain for global finance. Reya exists to solve these issues - delivering a DEX with institutional-grade execution and Ethereum-level security. One that is as fast as TradFi but simultaneously secure, reliable and credibly neutral. In doing so, we won’t just create a ‘faster DEX’. Instead, we will create a credible path for price-discovery to move onchain to Ethereum. In turn, creating a **foundation for open markets and globally accessible capital formation.** [PreviousWhat Is Reyachevron-left](https://docs.reya.xyz/) [NextWho Is Behind Reyachevron-right](https://docs.reya.xyz/get-started/who-is-behind-reya) Last updated 2 months ago --- # Who Is Behind Reya | Reya Reya was founded by [Simonarrow-up-right](https://x.com/0xSimonJones) and [Arturarrow-up-right](https://x.com/arturbegyan) who are both serial-entrepreneurs, having previously built successful web2 and web3 financial startups. They are supported by a team of traders and crypto-native builders, with backgrounds at Optiver, Wintermute, Goldman, Coinbase and Citi. Reya has raised $12m from investors including Framework, Coinbase Ventures, Wintermute Ventures, Selini Capital, Amber Group, Brevan Howard Digital Assets and Leadblock Ventures. Alongside prominent Angels like Stani of Aave/Lens, David and Ryan of Bankless and Kain of Synthetix/Infinex. [PreviousWhy Reya Existschevron-left](https://docs.reya.xyz/get-started/why-reya-exists) [NextHow Reya Is Differentchevron-right](https://docs.reya.xyz/get-started/how-reya-is-different) Last updated 2 months ago --- # Architecture (at a glance) | Reya ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2F3892139141-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGymvVw95ZlIikLljgnKB%252Fuploads%252Fjb3JTbKX8ZDLFs13KNTF%252Fimage.png%3Falt%3Dmedia%26token%3D7f9f33fb-1163-49ca-9df7-9e1bae8d9e24&width=768&dpr=4&quality=100&sign=7640140c&sv=2) A based-rollup works through a model comparable to proposer-builder-separation (PBS). Simply, Ethereum L1 validators delegate execution and sequencing rights to a third party. In PBS they delegate to builders. In a based-rollup they delegate to gateways, which we refer to as “Execution Nodes”. This delegation means Execution Nodes know they will be able to include their transactions in the L1 block. Since this is known, they can they give lightening fast ‘pre-confirmations’ back to traders who are executing trades through the exchange operated within an Execution Node. As a result, Reya has 2 confirmation levels: 1. Pre-confirmed: sequenced by the Execution Node and an execution receipt is available to the user 2. Finalised: the transaction has been batched and included in an L1 block A based-rollup must post transaction data through to the Ethereum L1. However, posting order data (from the orderbook) would be uneconomical, since order data is orders of magnitude greater than executions data. To solve this problem Reya has a hybrid DA structure: * Trade Executions data goes to Ethereum L1 * Order data goes to EigenDA Both are verifiable via ZK-proofs. The outcome for users is: * A lightening fast execution environment, achieving sub-millisecond trade speed * A highly secure structure * Ethereum L1 validators are the ultimate owners of block building * ZK-proofs allow for full verifiability of the entire trading system, from orders to executions * Execution nodes can be slashed if they misbehave, creating economic security * Synchronous composability with Ethereum, the biggest DeFi ecosystem in the world. For full details please read the whitepaper here: [https://x.com/0xSimonJones/status/1944737748381839671arrow-up-right](https://x.com/0xSimonJones/status/1944737748381839671) [PreviousHow Reya Is Differentchevron-left](https://docs.reya.xyz/get-started/how-reya-is-different) [NextReya Roadmapchevron-right](https://docs.reya.xyz/get-started/reya-roadmap) Last updated 2 months ago --- # Reya Roadmap | Reya Unlocking the breakthrough based zk rollup design has been an iterative path. To begin with, Reya was launched using a forked and heavily customised version of Arbitrum Orbit. This allowed the product to launch, deliver value to users and generate the necessary learnings required to unlock the based zk rollup design. This means Reya will transition to a based rollup iteratively over time. This will be done without any impact to users. This infrastructure upgrade will happen in stages * Stage 1: Orderbook launch (expected Q1 2026) * Stage 2: Migrate to based design, with single Execution Node (expected Q2 2026) * Stage 3: Introduce multiple rotating Execution Nodes (expected Q3 2026) Alongside this infrastructure upgrade, the trading venue will continue with a roadmap covering: * Spot markets * RWA-Crypto Perp Expansion * Launchpad * srUSD Tokenization [PreviousArchitecture (at a glance)chevron-left](https://docs.reya.xyz/get-started/architecture-at-a-glance) [NextDerivatives Clearingchevron-right](https://docs.reya.xyz/trading/derivatives-clearing) Last updated 2 months ago --- # How Reya Is Different | Reya Based-rollups are novel mechanisms through which developers can create isolated and performant application specific environments that still leverage the security and consensus of Ethereum L1 validators. These types of rollups haven’t been possible until now; for example some of the key technological unlocks, like the introduction of a [Deterministic Proposer Lookaheadarrow-up-right](https://eips.ethereum.org/EIPS/eip-7917) , have only just got the required R&D momentum. Previously, the main successful attempts at creating a performant onchain DEXs have been via 1. An alt-L1 2. A single-Sequencer Zk Rollup A based zk rollup is superior to these choices in every way: **Single-Sequencer Zk Rollup** **Alt-L1** **Based Zk Rollup** **Speed** Very fast Fast Very Fast **Economic Security** None Medium - dependant on L1 assets staked Excellent - Ethereum L1 Proposers and Execution Nodes **Liveness / Reliability** Low - Single point of failure Medium - dependant on number of L1 nodes and operators Excellent - Ethereum L1 Proposers and Execution Nodes **Censorship Resistance / Neutrality** Low - Single point of failure Medium - dependant on number of L1 nodes and operators Excellent - Ethereum L1 Proposers and Execution Nodes **Composability** Low - not possible with Ethereum L1 in sychronous manner Medium - dependant on size of L1 ecosystem Excellent - synchronous with Ethereum L1 Reya is the first ever trading-specific based zk rollup and a transformational moment for DEX design. [PreviousWho Is Behind Reyachevron-left](https://docs.reya.xyz/get-started/who-is-behind-reya) [NextArchitecture (at a glance)chevron-right](https://docs.reya.xyz/get-started/architecture-at-a-glance) Last updated 2 months ago --- # Perpetual Futures | Reya Reya Exchange is a perpetual futures exchange built on top of Reya Network. It will display all of the features unlocked by the financial logic of Reya Network. In particular, it provides both traders and LPs with unprecedented capital efficiency by: 1. **offsetting losses from one position with profits another**, and enabling leveraging of all portfolio profits immediately; 2. **offsetting and reducing margin requirements,** by recognizing the P&L offset that can happen between positions. All of this is accomplished with all the security of on-chain settlement and clearing. All your capital is guarded safe by a smart contract, and there is no “FTX-risk” that someone will just run away with it. ### [hashtag](https://docs.reya.xyz/trading/perpetual-futures#perpetual-futures) Perpetual Futures Perpetual futures are derivatives contracts where traders can have a PnL matching that of a given token without actually buying that token. For example, a trader that holding a long position for a unit of ETH will have the same PnL that they would have if they actually held one unit of ETH: when the ETH price goes up from 3,000rUSD to 3,100rUSD they will earn 100rUSD; on the other hand, if the price goes down to 2,900rUSD, they will have to pay 100rUSD. These amounts are interchanges with accounts holding short positions, in other words, traders that earn when the price goes down and vice versa. Additionally to the PnL from price variations, longs and shorts will also interchange a funding rate. This funding rate is used to incentivize balancing of long and short open interest, and to keep the perpetual futures in line with the spot market. When a trader enters a perpetual futures contract, they need to deposit collateral to ensure that they will be able to cover losses that they suffer in their positions. Managing these collateral requirements, settling PnLs, as well as resolving accounts when a trader has an insufficient balance is the main work of Reya’s Derivatives Clearing Module. [PreviousDerivatives Clearingchevron-left](https://docs.reya.xyz/trading/derivatives-clearing) [NextCross-marginingchevron-right](https://docs.reya.xyz/trading/cross-margining) Last updated 1 year ago --- # Derivatives Clearing | Reya [hashtag](https://docs.reya.xyz/trading/derivatives-clearing#a-clearing-protocol-built-for-capital-efficiency) A clearing protocol built for capital efficiency -------------------------------------------------------------------------------------------------------------------------------------------------------------------- Reya Derivatives Clearing is a **non-custodial clearing protocol for derivatives instruments.** The Derivatives Clearing Protocol is the cornerstone that allows Reya to act as a self-reinforcing liquidity network. One of its distinguishing features is that it can aggregate positions from multiple markets _and_ multiple exchanges into a single margin account. In particular, this provides both traders and LPs with unprecedented capital efficiency by offsetting: 1. **Losses from one position with profits another**, and enabling leveraging of all portfolio profits immediately 2. **Margin requirements,** by recognizing the P&L offset that can happen between positions 3. **P&L and margin** _**across**_ **exchanges,** by aggregating all positions into a single settlement and clearing layer Connecting exchanges can be both DeFi or CeFi venues supporting the trading of any linear derivative contract (e.g., Futures, Swaps) via any on- or off-chain trading mechanism (e.g. Orderbook, AMM, Passive LP pool). By deploying its own appchain, Reya aims at providing these benefits while bringing on-chain the experience and speed of traditional centralized exchanges. The basic concept in the Derivatives Clearing Protocol is that of a _collateral pool._ This is a compartment within the smart contract where margin deposits for any given market are kept and managed. Each of the user’s margin accounts is associated with one such collateral pool. Cashflow obligations are settled peer-to-pool. To make sure these are properly settled, the protocol has three main components: 1. Margin system that manages margin requirements for different settlement tokens and ensures safe levels of collateralization 2. Cross-collateralization module that manages features around collateralization with tokens other than the settlement token, as well as the auto-exchange mechanism which forces conversion to manage risk levels 3. Liquidation module that manages liquidation procedures when an account is declared liquidateable by the margin system. ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FGymvVw95ZlIikLljgnKB%2Fblobs%2FKxwCoLFlLw8LsHGoSkaU%2Fimage.png&width=768&dpr=4&quality=100&sign=d89ff8ff&sv=2) [hashtag](https://docs.reya.xyz/trading/derivatives-clearing#peer-to-pool-non-custodial-on-chain-trading) Peer-to-pool, non-custodial, on-chain trading ------------------------------------------------------------------------------------------------------------------------------------------------------------ Reya fully embraces the non-custodial nature of DeFi. This means that the entire flow of execution, clearing and settlement is done on the blockchain itself, in a transparent and secure way. Every user can verify their transactions as they get registered, as well as their balances, margin requirements and accrued cashflows. The Derivatives Clearing Protocol is non-custodial, meaning that all settlement and margin funds are are safeguarded cryptographically by the Protocol rather than by an administrator (eliminating ‘FTX’ risk). The Protocol includes mechanisms to ensure that all funds are correctly managed and settled. Furthermore, the architecture of the Derivatives Clearing around collateral pools means that trading in Reya is peer-to-pool: although positions are originated in pairs at associated exchanges to ensure pool neutrality, subsequent margining and settlement is between the user and the collateral pool itself. In particular, the counterparty at the origin of the position might completely unwind their exposure with no difference for the user. Peer-to-pool trading is the decentralized version of the CCP’s novation: rather than splitting a contract into two, between each of the two counterparties and a central party, the smart contract and the collateral pool itself lies at the center of the system, with every party facing it. Importantly, the single insolvency and liquidation of the counterparty has no direct bearing on a user, and their settlement cashflows are guaranteed as long as the pool as a whole remains solvent. Accordingly, if the pool’s solvency is threatened by a contract or instrument, positions are shortcut or, in the extreme case, losses are distributed in a socialized manner through auto-deleveraging as discussed below. [hashtag](https://docs.reya.xyz/trading/derivatives-clearing#margin-accounts) Margin accounts -------------------------------------------------------------------------------------------------- Users can create multiple accounts per wallet, where each account is represented as an ERC-721 Token. This provides users with the ability to create segregated accounts for trades they don’t want cross-margined with other positions. The use of an ERC-721 Token also provides the following benefits: * Users can transfer these accounts to another wallet without unwinding any positions. In many ways, this is akin to in-specie transfers and provides a significant improvement in functionality for sophisticated actors on the protocol. * Segregated account owners, which can be EOAs or smart contracts, are able to prescribe granular permissioning rules to other EOA and smart contract addresses. This may, for example, allow a user to have a cold wallet for withdrawals but grant permissions to their hot wallet to conduct trades without giving it withdrawal access * Since addresses are decoupled from accounts, it is possible to layer in further abstractions that govern delegation and authorization flows improving account management operational security. [PreviousReya Roadmapchevron-left](https://docs.reya.xyz/get-started/reya-roadmap) [NextPerpetual Futureschevron-right](https://docs.reya.xyz/trading/perpetual-futures) * [A clearing protocol built for capital efficiency](https://docs.reya.xyz/trading/derivatives-clearing#a-clearing-protocol-built-for-capital-efficiency) * [Peer-to-pool, non-custodial, on-chain trading](https://docs.reya.xyz/trading/derivatives-clearing#peer-to-pool-non-custodial-on-chain-trading) * [Margin accounts](https://docs.reya.xyz/trading/derivatives-clearing#margin-accounts) --- # Margin System | Reya [hashtag](https://docs.reya.xyz/trading/margin-system#exposures) Exposures ------------------------------------------------------------------------------- Instruments in REYA have linear exposures to these risk factors. Explicitly, this means that if risk factors are a multivariate random variable RtR\_tRt​ of nnn factors, then each instrument determines a vector EtE\_tEt​such that the price of the instrument is Pt\=Et′RtP\_t=E\_t'R\_tPt​\=Et′​Rt​ This means in particular that the entries of $E\_t'$ transform the risk factors into token amounts. As a consequence, note that the exposure vector will often be a function of more than just time: for example, if a given risk factor is the relative (percentual) returns rt,ir\_{t,i}rt,i​ of some asset, then et,ie\_{t,i}et,i​ will generally have the price pt,ip\_{t,i}pt,i​ as a factor to transform the percentual return rt,ir\_{t,i}rt,i​ into an absolute return pt,irt,ip\_{t,i}r\_{t,i}pt,i​rt,i​ in token amount. For example, if a user holds exposure of two units of ETH when its price is $1500, then their exposure is $3000. Finally, note that by linearity, exposures are additive, meaning that a portfolio’s exposure is simply the weighted sum (with portfolio weights) of the exposure vectors of each component. [hashtag](https://docs.reya.xyz/trading/margin-system#the-risk-matrix) The risk matrix ------------------------------------------------------------------------------------------- Having established the fundamental framework, pools in REYA take as risk parameters an n×nn\\times nn×n matrix AAA, as well as two multipliers λM\\lambda\_MλM​ and λI\\lambda\_IλI​. Given this matrix, REYA computes the liquidation margin requirement for a portfolio exposure vector EEE as LMR\=E′AE\\mathrm{LMR}=\\sqrt{E'AE}LMR\=E′AE​ and then MMR\=λMLMR\\mathrm{MMR}=\\lambda\_M\\mathrm{LMR}MMR\=λM​LMR and IMR\=λILMR\\mathrm{IMR}=\\lambda\_I\\mathrm{LMR}IMR\=λI​LMR. The matrix AAAof course, must be carefully chosen and updated for the system to appropriately margin portfolios. The cases of multivariate normal and Student's t-distribution are instructive in getting intuition about the risk matrix. However, REYA will generally rely on a more flexible version, where the components can be independently adjusted according to risk estimates mixing, e.g., Value-at-Risk and Expected Shortfall methods. [PreviousCross-marginingchevron-left](https://docs.reya.xyz/trading/cross-margining) [NextCross-collateralizationchevron-right](https://docs.reya.xyz/trading/cross-collateralization) * [Exposures](https://docs.reya.xyz/trading/margin-system#exposures) * [The risk matrix](https://docs.reya.xyz/trading/margin-system#the-risk-matrix) --- # Cross-margining | Reya One of Reya’s fundamental innovation is a system for full cross-margining of positions, made possible by the extensive liquidation engine and its innovative waterfall structure. Reya Network’s margin system has a holistic view of a traders portfolio. This means when setting margin requirements, it takes into account that certain positions in a portfolio can win when others lose, in effect reducing the aggregate losses that a portfolio as a whole can suffer. As a result, a trader would need to deposit less capital as margin for those aggregate losses. Cross-margining is the system of accounting for these synergies in the portfolio and consequent margin savings. In particular, cross-margining enables very capital efficient relative value (long-short) trades. While it is completely fair to trade on whether a given token will go up or down, whether a given project is winner or a loser, more often than not, true trading opportunities are in betting on whether two projects will converge or diverge relative to one another. By longing one and shorting the other, a trader stands to gain precisely with those movements, irrespective of whether the market as whole goes up or down. Using two-year data up until December 31, 2023 and a preliminary margin model, Reya’s cross-margining system would have resulted in >350% more capital efficient ETH-BTC spread trading. Margin efficiencies are the cornerstone for capital efficiency and are essential for liquidity providers, as they will accumulate large portfolios with many offsetting pieces, and by recognizing them, cross margining frees up LP’s resources to provide further liquidity [PreviousPerpetual Futureschevron-left](https://docs.reya.xyz/trading/perpetual-futures) [NextMargin Systemchevron-right](https://docs.reya.xyz/trading/margin-system) --- # Cross-collateralization | Reya REYA creates a new type of margin account that allows both for: * posting of collateral in any token, so that users may leverage their preferred tokens while holding on to them. As example use cases, users can hold onto their yield bearing tokens (e.g., stETH) while backing a portfolio in their base token (e.g. ETH); or holding ETH to back a USDC position, perhaps ensuring a constant collateralization ratio by posting ETH to back a short USDC-denominated ETH perp. * Aggregation of portfolios in different settlement tokens, unprecedently. This is a unique feature in Reya, which allows users to share PnL across portfolios in different denominations, analogously to the sharing of PnL with a settlement token. By doing so, users can automatically virtually borrow from one portfolio onto another with actual conversion happening only as needed, ensuring maximal synergy. Reya’s cross-collateralization module uses a system of bubbles and haircuts based in USDC to manage collateral mismatch. This means that: * when converting amounts from one token into another, a haircut is applied to conservatively account for possible future movements of the exchange rate; * margin requirements are first netted out, as much as possible, within each bubble, to avoid distorting effects of the haircuts; * closely associated tokens (e.g. yield bearing tokens) are included at the bubble level to minimize unnecessary haircuts; * all surplus or deficit margin in the bubbles is then rebased and netted off. The following diagram illustrates the system, where we use USD as the root of the diagram as an example. ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FGymvVw95ZlIikLljgnKB%2Fblobs%2FawlvgMG3Z1mP5lrLugec%2Fimage.png&width=768&dpr=4&quality=100&sign=aef12742&sv=2) [PreviousMargin Systemchevron-left](https://docs.reya.xyz/trading/margin-system) [NextHaircutschevron-right](https://docs.reya.xyz/trading/cross-collateralization/haircuts) --- # Smart Contract Withdrawals | Developers | Reya As shown in the dApp funds on Reya Network are non-custodial and available to withdraw at anytime. You may use the withdrawal buttons on the dApp, or alternative you can withdraw directly from the Reya Network smart contracts. **Follow the guide below to withdraw from the smart contracts.** * * * 1. Bridge ETH to Reya Network for gas fees and Socket bridge fees by using this bridge: [https://bridge.gelato.network/bridge/reya-networkarrow-up-right](https://bridge.gelato.network/bridge/reya-network) . Note that: 1. The bridge does not support ETH withdrawals for the time being, so make sure you don’t bridge too much ETH. 2. Trading on Reya Network is made gas-free via a relayer architecture, if you’re interacting with the contracts directly you will need to pay a small amount of gas (hence the ETH needed). ![](https://docs.reya.network/~gitbook/image?url=https%3A%2F%2F4172979140-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIHVxf7CaLQzjdZ5a8tyE%252Fuploads%252FaYn82zYOMm7iFAfnjhYp%252Fimage.png%3Falt%3Dmedia%26token%3D175dfb8f-b628-418b-8ed0-6874fd01cdbd&width=768&dpr=4&quality=100&sign=2bfc19e9&sv=2) 2. Withdraw funds from the Passive Pool into your wallet on Reya Network by calling the removeLiquidity function here: [https://usecannon.com/packages/reya-omnibus/latest/1729-main/interact/reya-omnibus/PassivePoolProxy/0xB4B77d6180cc14472A9a7BDFF01cc2459368D413#selector-0x0b7c92f9arrow-up-right](https://usecannon.com/packages/reya-omnibus/latest/1729-main/interact/reya-omnibus/PassivePoolProxy/0xB4B77d6180cc14472A9a7BDFF01cc2459368D413#selector-0x0b7c92f9) . To do this, you need to input the following parameters: 1. poolId: 1 2. sharesAmount: the amount you want to withdraw multiplied by 10^30 (10 to the power of 30). 3. minAmount: the amount you want to withdraw multiplied by 10^6 For example, if you want to withdraw 99.5 rUSD, the parameters will be: 1. poolId: 1 2. sharesAmount: 99500000000000000000000000000000 3. minAmount: 99500000 3. Unwrap rUSD into USDC by calling the withdraw function here: [https://usecannon.com/packages/reya-omnibus/latest/1729-main/interact/reya-omnibus/RUSDProxy/0xa9F32a851B1800742e47725DA54a09A7Ef2556A3#selector-0x2e1a7d4darrow-up-right](https://usecannon.com/packages/reya-omnibus/latest/1729-main/interact/reya-omnibus/RUSDProxy/0xa9F32a851B1800742e47725DA54a09A7Ef2556A3#selector-0x2e1a7d4d) . To do this, you need to input the following parameters: 1. amount: the amount withdrawn at the previous step, same as minAmount (multiplied by 1000000). For example, if you withdrawn 99.5 rUSD, the parameters will be amount = 99500000 4. Confirm you have USDC in your Reya Wallet. 1. Add the chain to your wallet. There is a link in the footer of: [https://explorer.reya.network/arrow-up-right](https://explorer.reya.network/) ![](https://docs.reya.network/~gitbook/image?url=https%3A%2F%2F4172979140-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIHVxf7CaLQzjdZ5a8tyE%252Fuploads%252FmQFS3KfuEx5eVQamrkW2%252Fimage.png%3Falt%3Dmedia%26token%3Db0825ced-080e-4ee0-9a0d-d9c8df6e03b3&width=300&dpr=4&quality=100&sign=aa83514e&sv=2) 2. Add the token at address: 0x3B860c0b53f2e8bd5264AA7c3451d41263C933F2 For example using Metamask: ![](https://docs.reya.network/~gitbook/image?url=https%3A%2F%2F4172979140-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIHVxf7CaLQzjdZ5a8tyE%252Fuploads%252FlagVs3y8tJKlcI7VKyfG%252Fimage.png%3Falt%3Dmedia%26token%3D6513882f-6622-462f-b389-334a9149f93d&width=300&dpr=4&quality=100&sign=7f0b7758&sv=2) Enter the contract address and the symbol and decimals should auto-populate. Press Next ![](https://docs.reya.network/~gitbook/image?url=https%3A%2F%2F4172979140-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIHVxf7CaLQzjdZ5a8tyE%252Fuploads%252FDRHuHJdi2GeZp76DMDkc%252Fimage.png%3Falt%3Dmedia%26token%3D594bf99b-00ef-4112-8834-b278aa77be9e&width=300&dpr=4&quality=100&sign=d475d9df&sv=2) 5. Once confirmed, you should bridge funds from Reya Network to a source chain (Ethereum Mainnet/Arbitrum/Optimism/Polygon). To do this, you have to call the bridge function on the Socket contract here: [https://explorer.reya.network/address/0x1d43076909Ca139BFaC4EbB7194518bE3638fc76?tab=write\_contract#405e720aarrow-up-right](https://explorer.reya.network/address/0x1d43076909Ca139BFaC4EbB7194518bE3638fc76?tab=write_contract#405e720a) . ![](https://docs.reya.network/~gitbook/image?url=https%3A%2F%2F4172979140-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FIHVxf7CaLQzjdZ5a8tyE%252Fuploads%252FIImwsvtmdBvDQQD9BG05%252Fimage.png%3Falt%3Dmedia%26token%3Dfd994820-d3b2-42ba-abca-d2ff0b66b4d3&width=300&dpr=4&quality=100&sign=c66e47c8&sv=2) To do this, you have to provide the following parameters: 1. receiver: your wallet address on the source chain (the chain you are withdrawing to) 2. amount: the amount withdrawn at the previous steps, same as minAmount (still multiplied by 1000000). 1. note: the pull down at the end of the row will help you multiply by 10^6 but this number should be the same as the one used in the previous steps 3. msgGasLimit: 10000000 4. connector: the socket connector address assigned to the source chain you want to withdraw to. NetworkConnector Address Ethereum Mainnet 0x807B2e8724cDf346c87EEFF4E309bbFCb8681eC1 Arbitrum 0x663dc7E91157c58079f55C1BF5ee1BdB6401Ca7a Optimism 0xe48AE3B68f0560d4aaA312E12fD687630C948561 Polygon 0x54CAA0946dA179425e1abB169C020004284d64D3 5. execPayload: 0x 6. options: 0x 7. Send native ETH (uint256): the socket bridge fees. As these are dynamic, you can use 10000000000000000 to account for most cases (this is equivalent to 0.01 ETH). Note that you can use lower amount as well (e.g. 1000000000000000, which is equivalent to 0.001 ETH), but it might fail if Socket fees increase. Upon completion of these steps, funds should be in the destination wallet address entered, on the network corresponding to the network connecter address used, in 10-15min. If you have not received your funds after an hour, please open a support ticket in our Discord and we can try and help. [PreviousWebsocket API Referencechevron-left](https://docs.reya.xyz/developers/websocket-api-reference) Last updated 2 months ago --- # Rest API Reference | Developers | Reya **Base URL**: `https://api.reya.xyz/v2` [hashtag](https://docs.reya.xyz/developers#overview) Overview ------------------------------------------------------------------ The Reya DEX REST API v2 provides programmatic access to the Reya Perpetual Exchange, enabling traders to interact with the platform algorithmically. This API is designed for developers and professional traders who want to build automated trading systems, integrate with existing platforms, or develop custom interfaces for the Reya DEX ecosystem. [hashtag](https://docs.reya.xyz/developers#key-features) Key Features -------------------------------------------------------------------------- * **Market Data**: Access comprehensive market information, including asset definitions, market summaries, and real-time price data * **Order Management**: Create, cancel, and monitor orders with support for various order types (limit, trigger) * **Position Tracking**: Monitor your current positions and historical executions * **Wallet Integration**: Manage wallet configurations and access wallet-specific data * **Price Data**: Access historical price data with customizable time intervals through candle endpoints [hashtag](https://docs.reya.xyz/developers#api-structure) API Structure ---------------------------------------------------------------------------- The API is organized into several logical sections: * **Reference Data**: Discover markets and assets definitions, trading fees * **Market Data**: Access real-time and historical market data, including prices, candles and order execution * **Wallet Data**: Get information about the wallet's accounts, positions and orders * **Order Entry**: Create and cancel orders [hashtag](https://docs.reya.xyz/developers#signatures) Signatures ---------------------------------------------------------------------- For private endpoints that access user-specific data or perform actions on behalf of a user, authentication is required through wallet signatures. This ensures that only authorized users can create and update orders. [hashtag](https://docs.reya.xyz/developers#rate-limits) Rate Limits ------------------------------------------------------------------------ To ensure fair usage and optimal performance, the API implements rate limiting. For more information, see the [Rate Limits](https://docs.reya.xyz/developers/rest-api-reference/rate-limits) documentation. For real-time data needs, consider using our WebSocket API for streaming updates. [NextSpecschevron-right](https://docs.reya.xyz/developers/rest-api-reference/specs) Last updated 1 month ago * [Overview](https://docs.reya.xyz/developers#overview) * [Key Features](https://docs.reya.xyz/developers#key-features) * [API Structure](https://docs.reya.xyz/developers#api-structure) * [Signatures](https://docs.reya.xyz/developers#signatures) * [Rate Limits](https://docs.reya.xyz/developers#rate-limits) --- # Haircuts | Reya A haircut is a percentage decrease in the exchange rate applied for risk reasons: specifically, given two tokens or currencies TTT and T′T'T′, we convert T′T'T′ a collateral not simply by multiplying by the exchange rate XT′/TX\_{T'/T}XT′/T​, but rather by multiplying by (1−haircutT′)XT′/T (1-\\textrm{haircut}\_{T'})X\_{T'/T}(1−haircutT′​)XT′/T​ The resulting amount is less than the market value of the collateral, the difference serving as a cushion for future exchange rate fluctuations that might happen if and until the collateral is converted to cover margin requirements. The haircut, then, can be thought of as margin, but applied statically and in a segregated fashion to the collateral. The methodologies for calculating its values will need risk measures like margin models. The previous multiplier assumed that the worst scenario is when the exchange rate goes down, which is indeed the case when converting positive quantities. If we convert negative quantities, however, the worst outcome is actually when the exchange rate goes up instead. Therefore, when moving around margin requirements or negative balances, one multiplies instead by 11−haircutT′XT′/T\\frac{1}{1-\\textrm{haircut}\_{T'}}X\_{T'/T} 1−haircutT′​1​XT′/T​ The advantage of this form is that 1(1−haircutT′)XT′/T\=11−haircutT′XT/T′ \\frac{1}{(1-\\textrm{haircut}{T'})X\_{T'/T}}=\\frac{1}{1-\\textrm{haircut}{T'}}X\_{T/T'}(1−haircutT′)XT′/T​1​\=1−haircutT′1​XT/T′​ so that the multipliers get interchanges when reversing the sense of the arrows in the graph. [PreviousCross-collateralizationchevron-left](https://docs.reya.xyz/trading/cross-collateralization) [NextAuto-exchange conditionschevron-right](https://docs.reya.xyz/trading/cross-collateralization/auto-exchange-conditions) --- # Specs | Developers | Reya OpenAPI and AsyncAPI specs ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/specs#get-openapi-spec.yaml) Get OpenAPI specification get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /openapi-spec.yamlcopy Returns the complete OpenAPI specification for this API in YAML format Responses chevron-right 200 OpenAPI specification in YAML format application/yaml Responsestring · binary chevron-right 500 Internal server error application/json get /openapi-spec.yaml HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 OpenAPI specification in YAML format chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/specs#get-asyncapi-spec.yaml) Get AsyncAPI specification get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /asyncapi-spec.yamlcopy Returns the complete AsyncAPI specification for WebSocket API in YAML format Responses chevron-right 200 AsyncAPI specification in YAML format application/yaml Responsestring · binary chevron-right 500 Internal server error application/json get /asyncapi-spec.yaml HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 AsyncAPI specification in YAML format chevron-down [PreviousRest API Referencechevron-left](https://docs.reya.xyz/developers) [NextReference Datachevron-right](https://docs.reya.xyz/developers/rest-api-reference/reference-data) Last updated 21 days ago * [GETGet OpenAPI specification](https://docs.reya.xyz/developers/rest-api-reference/specs#get-openapi-spec.yaml) * [GETGet AsyncAPI specification](https://docs.reya.xyz/developers/rest-api-reference/specs#get-asyncapi-spec.yaml) Copy GET /v2/openapi-spec.yaml HTTP/1.1 Host: api.reya.xyz Accept: */* Copy binary Copy GET /v2/asyncapi-spec.yaml HTTP/1.1 Host: api.reya.xyz Accept: */* Copy binary --- # Auto-exchange conditions | Reya In the first instance, Reya Network’s cross-collateralization features allow users to accumulate a T-specific insolvency for T a settlement token, even while remaining globally solvent. This, however, creates the risk that the pool itself will become T-insolvent if enough of these T-insolvencies accumulate. To avoid this scenario, Reya Network has a set of **auto-exchange** conditions, one set limiting the size of negative T-balances both in absolute and relative terms, and the other set forcing collateral matching (T-solvency) when liquidating. The auto-exchange conditions can be organized in two groups: 1. **Conditions that limit negative balances:** whereas cross-collateralization allows users to run negative balances, there are three conditions that put limits on this: * _Individual token threshold_: for each TTT, BalT≥−boundTBal\_T \\geq -bound\_TBalT​≥−boundT​where boundTbound\_TboundT​ is a governance set (positive) parameter. * _Global threshold_: given all settlement TTT in the margin account, ∑BalT<0XT/USD1−haircutT/USDBalT≥−bound\\sum\_{Bal\_T<0} \\frac{X\_{T/USD}}{1-\\mathrm{haircut}\_{T/USD}}Bal\_T \\geq - bound∑BalT​<0​1−haircutT/USD​XT/USD​​BalT​≥−bound, where boundboundbound is a governance set (positive) parameter. * _Negative ratio threshold_: given all settlement TTT in the margin account, ∑BalT<0XT/USDBalT≥−η⋅AV\\sum\_{Bal\_T<0} X\_{T/USD}Bal\_T \\geq -\\eta\\cdot \\mathrm{AV}∑BalT​<0​XT/USD​BalT​≥−η⋅AVwhere 0<η<10<\\eta<10<η<1 is a governance set parameter, and AV\\mathrm{AV}AV, the total value of collateral in the account (without haircuts). 2. **Condition that limits mismatched margin coverage:** whereas the Boss Mode margin coverage condition allows users to cover even the entirety initial or maintenance margin requirements with surplus collateral of other bubbles, once an account breaches the maintenance margin condition, we further require that for every bubble for which there is a deficit maintenance margin the following condition holds: BalT−LMRT≥0Bal\_T-LMR\_T\\geq 0BalT​−LMRT​≥0 The purpose of this condition is to isolate the liquidation processes of the different bubbles. In particular, the liquidation margin requirement can be separately verified individually for every bubble, and the liquidation process applies always to a single token situation. [PreviousHaircutschevron-left](https://docs.reya.xyz/trading/cross-collateralization/haircuts) [NextAuto-exchange mechanismchevron-right](https://docs.reya.xyz/trading/cross-collateralization/auto-exchange-mechanism) --- # Signatures and Nonces | Developers | Reya Signatures are required to safely execute orders in the name of your wallet. The API endpoints for order management require a user signature that must be created on the client side using your private key. These signatures are validated on-chain for all order details you specified to ensure no unintended action is executed on your account. Internal nonces for your wallet address, tracked in the smart contracts, are used to prevent replay attacks. Creating your own signatures and nonces can be a bit tricky, and a single detail being wrong will result in an "invalid signature" error which are notably hard to debug. Our recommendation is to check our python SDK's code to fully understand every detail on how signatures need to be produced. [PreviousRate Limitschevron-left](https://docs.reya.xyz/developers/rest-api-reference/rate-limits) [NextWebsocket API Referencechevron-right](https://docs.reya.xyz/developers/websocket-api-reference) Last updated 1 month ago --- # Rate Limits | Developers | Reya To ensure fair usage and maintain optimal performance for all users, the Reya API implements rate limiting. The enforced rate limits are the following: * **1,000 requests** per 60-second window per IP address/API key * Rate limit counters reset at the end of each 60-second window ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/rate-limits#important-notes) Important Notes * You can consume your entire quota at any point within the window (for example, all 1,000 requests in the first second) * Once the limit is reached, additional requests will be rejected with a `429 Too Many Requests` status code until the current window expires * Rate limits apply across all API endpoints collectively, not per endpoint For most real-time data needs, we recommend using our WebSocket API instead of polling the REST API. If your application requires higher rate limits, please contact the Reya team. The team will review your request and determine if higher limits can be granted based on your specific needs and usage patterns. [PreviousModelschevron-left](https://docs.reya.xyz/developers/rest-api-reference/models) [NextSignatures and Nonceschevron-right](https://docs.reya.xyz/developers/rest-api-reference/signatures-and-nonces) Last updated 2 months ago --- # Reference Data | Developers | Reya Market definitions, global parameters, liquidity parameters, etc. ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-marketdefinitions) Get market definitions get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /marketDefinitionscopy Responses chevron-right 200 List of market definitions application/json Responseobject · MarketDefinition\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /marketDefinitions HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of market definitions chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-spotmarketdefinitions) Get spot market definitions get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /spotMarketDefinitionscopy Responses chevron-right 200 List of spot market definitions application/json Responseobject · SpotMarketDefinition\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /spotMarketDefinitions HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of spot market definitions chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-assetdefinitions) Get asset definitions get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /assetDefinitionscopy Responses chevron-right 200 List of asset definitions application/json Responseobject · AssetDefinition\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /assetDefinitions HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of asset definitions chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-liquidityparameters) Get liquidity parameters get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /liquidityParameterscopy Responses chevron-right 200 List of liquidity parameters application/json Responseobject · LiquidityParameters\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /liquidityParameters HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of liquidity parameters chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-globalfeeparameters) Get global fee parameters get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /globalFeeParameterscopy Responses chevron-right 200 Global fee parameters application/json Responseobject · GlobalFeeParameters Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /globalFeeParameters HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Global fee parameters chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-feetiers) Get fee tiers get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /feeTierscopy Responses chevron-right 200 List of fee tier parameters application/json Responseobject · FeeTierParameters\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /feeTiers HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of fee tier parameters chevron-down [PreviousSpecschevron-left](https://docs.reya.xyz/developers/rest-api-reference/specs) [NextMarket Datachevron-right](https://docs.reya.xyz/developers/rest-api-reference/market-data) Last updated 21 days ago * [GETGet market definitions](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-marketdefinitions) * [GETGet spot market definitions](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-spotmarketdefinitions) * [GETGet asset definitions](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-assetdefinitions) * [GETGet liquidity parameters](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-liquidityparameters) * [GETGet global fee parameters](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-globalfeeparameters) * [GETGet fee tiers](https://docs.reya.xyz/developers/rest-api-reference/reference-data#get-feetiers) Copy GET /v2/marketDefinitions HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "symbol": "BTCRUSDPERP",\ "marketId": 1747927089946,\ "minOrderQty": "1.0",\ "qtyStepSize": "1.0",\ "tickSize": "1.0",\ "liquidationMarginParameter": "1.0",\ "initialMarginParameter": "1.0",\ "maxLeverage": 1747927089946,\ "oiCap": "1.0",\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] Copy GET /v2/spotMarketDefinitions HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "symbol": "BTCRUSDPERP",\ "marketId": 1747927089946,\ "baseAsset": "ETH",\ "quoteAsset": "RUSD",\ "minOrderQty": "1.0",\ "qtyStepSize": "1.0",\ "tickSize": "1.0",\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] Copy GET /v2/assetDefinitions HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "asset": "BTCRUSDPERP",\ "spotMarketSymbol": "BTCRUSDPERP",\ "priceHaircut": "1.0",\ "liquidationDiscount": "1.0",\ "status": "ENABLED",\ "decimals": 1747927089946,\ "displayDecimals": 1747927089946,\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] Copy GET /v2/liquidityParameters HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "symbol": "BTCRUSDPERP",\ "depth": "1.0",\ "velocityMultiplier": "1.0",\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] Copy GET /v2/globalFeeParameters HTTP/1.1 Host: api.reya.xyz Accept: */* Copy { "ogDiscount": "1.0", "refereeDiscount": "1.0", "referrerRebate": "1.0", "affiliateReferrerRebate": "1.0", "ANY_ADDITIONAL_PROPERTY": "anything" } Copy GET /v2/feeTiers HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "tierId": 1747927089946,\ "takerFee": "43000.00",\ "makerFee": "43000.00",\ "volume14d": "1.0",\ "tierType": "REGULAR",\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] --- # Dutch auction | Reya The Dutch auction process kicks in either when the open bidding process has failed to bring the account back to health, or when the liquidation margin requirement was breached directly and there was no time for the preparatory bidding. Recognizing the urgency of such cases, the Protocol consecutively quotes decreasing ddd, starting at some predefined maximum, and ending at a predefined minimum, and immediately allows execution of liquidation proposals with margin reward parameter smaller than ddd. [PreviousRanked liquidationschevron-left](https://docs.reya.xyz/trading/liquidation-engine/ranked-liquidations) [NextBackstop LPschevron-right](https://docs.reya.xyz/trading/liquidation-engine/backstop-lps) --- # Auto-exchange mechanism | Reya When one of the auto-excange conditions is breached, the system will forcefully convert other tokens into T by relying in external ‘auto-exchangers’ who receive a discount over market price as incentive. The amounts available will take into account both the amounts in the T-bubble, as well as those that can be moved from other bubbles. The amount of collateral mmm of token SSS the auto-exchanger receives in exchange is computed as (1−discountS/T)XS/T×m\=n(1-\\mathrm{discount}\_{S/T})X\_{S/T}\\times m=n(1−discountS/T​)XS/T​×m\=n where both discountS/T\\mathrm{discount}\_{S/T}discountS/T​ and XS/TX\_{S/T}XS/T​ will generally be a compound term, computed as products/quotients of the official pool discounts and exchange rates (one needs to trace the S→T path on the directed graph). The following diagram illustrates the general flow. ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FGymvVw95ZlIikLljgnKB%2Fblobs%2F4I4DA6yNVEuujWHdPEFN%2Fimage.png&width=768&dpr=4&quality=100&sign=104c52ef&sv=2) [PreviousAuto-exchange conditionschevron-left](https://docs.reya.xyz/trading/cross-collateralization/auto-exchange-conditions) [NextLiquidation Enginechevron-right](https://docs.reya.xyz/trading/liquidation-engine) --- # Insurance Funds | Reya Reya Network includes a system of insurance funds to backstop potential collateral pool insolvencies. These insurance funds accumulate the greater part of the liquidation fees, and fill the shortfall when losses exceeded the deposited margin. But two important aspects: 1. There are set limits on how much the insurance funds can cover (depending on size of account). ADL at a loss would kick in beyond that limit. 2. The insurance funds plug in the shortfall, but only **realized shortfalls resulting from the liquidation** (i.e., measured as the realized loss of the liquidated account resulting from the liquidation) 3. The insurance funds plug the shortfall to the pool as whole and not to any particular account. A development of the full ecosystem of exchanges on top of Reya Network will most likely introduce a second layer of backstop after the insurance funds. [PreviousBackstop LPschevron-left](https://docs.reya.xyz/trading/liquidation-engine/backstop-lps) [NextIntroductionchevron-right](https://docs.reya.xyz/chain/introduction) --- # Allocation & Release Schedule | Reya Allocation of the token supply is as important as the token design. Incentivising and rewarding those who actively use and run the protocol is critical for long-term success. Most important within this is the community of traders, builders and liquidity providers who make up the Reya Community; and the tokenomics allocations are designed to reflect this. ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2F3892139141-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGymvVw95ZlIikLljgnKB%252Fuploads%252Fq9TSKDZ71pcXoFczKh4e%252FScreenshot%25202025-11-19%2520at%252011.55.19.png%3Falt%3Dmedia%26token%3D700ecc58-e87e-4af2-9e82-e8ac5bb01bab&width=768&dpr=4&quality=100&sign=e17894fb&sv=2) Distribution will start at the TGE, through an airdrop to Reya users. Multiple subsequent airdrops are then planned, with precise timing and allocation to be decided by governance and the Reya Foundation. Reya Labs team and investors are locked for 1 year, highlighting their commitment to build long-term, with linear monthly vesting for 3 years after. ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2F3892139141-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGymvVw95ZlIikLljgnKB%252Fuploads%252F5IIx2FpLysLpULXTvH1B%252FScreenshot%25202025-11-19%2520at%252011.56.13.png%3Falt%3Dmedia%26token%3D4da385b8-9ac3-4ac8-9b63-075867f4f20b&width=768&dpr=4&quality=100&sign=f0d5530b&sv=2) [PrevioussREYA Additional Utilitychevron-left](https://docs.reya.xyz/reya-token/token-design/sreya-additional-utility) [NextReya Chain Points: FAQschevron-right](https://docs.reya.xyz/reya-token/reya-chain-points-faqs) Last updated 2 months ago --- # Backstop LPs | Reya The backstop LP pool would be a pool where people deposit funds which can be used to force positions onto them. It is important to not that the liquidation process never pushes losses onto backstop LPs, as positions, as this mechanism is only activated while possible losses can be covered by the insurance fund. The true drawback for backstop LPs, then, is not having to absorb liquidation losses, but rather the need to actively manage the positions that were pushed onto them so as to avoid subsequent losses while holding the portfolio. In return for providing liquidity to backstop the liquidation process, backstop LPs get (at least) the following benefits: 1. a portion of collected liquidation fees is distributed to backstop LPs. 2. Exemption from liquidation fees when a position is pushed onto them, regardless of whether it is at profit. 3. the system will actually try to push the positions at profit: when we reach say 25% of LMR, the positions would be pushed onto backstop LPs at bankruptcy price, that is, the entirety of the margin would be transferred (as opposed to the earlier stage, where the Protocol is trying to minimize a discount). This will generally be below market price. 4. In any case, the worst that can happen is that a position gets pushed at market (TWAP) price if the account’s losses have exhausted the margin balance, and then only below the ADL threshold. [PreviousDutch auctionchevron-left](https://docs.reya.xyz/trading/liquidation-engine/dutch-auction) [NextInsurance Fundschevron-right](https://docs.reya.xyz/trading/liquidation-engine/insurance-funds) --- # Wallet Data | Developers | Reya Accounts, positions, trades, etc. ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-accounts) Get wallet accounts get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /wallet/{address}/accountscopy Path parameters addressstringRequiredExample: `0x6c51275fd01d5dbd2da194e92f920f8598306df2`Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 200 List of accounts application/json Responseobject · Account\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /wallet/{address}/accounts HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of accounts chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-perpexecutions) Get wallet perp executions get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /wallet/{address}/perpExecutionscopy Returns up to 100 perp executions for a given wallet. Path parameters addressstringRequiredExample: `0x6c51275fd01d5dbd2da194e92f920f8598306df2`Pattern: `^0x[a-fA-F0-9]{40}$` Query parameters startTimeintegerOptional Return results after this sequence number (for pagination) Example: `1747927089946` endTimeintegerOptional Return results before this sequence number (for pagination) Example: `1747927089946` Responses chevron-right 200 List of perpetual executions application/json Responseobject · PerpExecutionList Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /wallet/{address}/perpExecutions HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of perpetual executions chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-spotexecutions) Get wallet spot executions get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /wallet/{address}/spotExecutionscopy Returns up to 100 spot executions for a given wallet. Path parameters addressstringRequiredExample: `0x6c51275fd01d5dbd2da194e92f920f8598306df2`Pattern: `^0x[a-fA-F0-9]{40}$` Query parameters startTimeintegerOptional Return results after this sequence number (for pagination) Example: `1747927089946` endTimeintegerOptional Return results before this sequence number (for pagination) Example: `1747927089946` Responses chevron-right 200 List of spot executions application/json Responseobject · SpotExecutionList Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /wallet/{address}/spotExecutions HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of spot executions chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-positions) Get wallet positions get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /wallet/{address}/positionscopy Path parameters addressstringRequiredExample: `0x6c51275fd01d5dbd2da194e92f920f8598306df2`Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 200 List of positions application/json Responseobject · Position\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /wallet/{address}/positions HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of positions chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-accountbalances) Get wallet account balances get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /wallet/{address}/accountBalancescopy Returns all account real balances for a wallet. Path parameters addressstringRequiredExample: `0x6c51275fd01d5dbd2da194e92f920f8598306df2`Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 200 List of account balances application/json Responseobject · AccountBalance\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /wallet/{address}/accountBalances HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of account balances chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-openorders) Get wallet open orders get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /wallet/{address}/openOrderscopy Returns all pending orders for a wallet. Path parameters addressstringRequiredExample: `0x6c51275fd01d5dbd2da194e92f920f8598306df2`Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 200 List of open orders application/json Responseobject · Order\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /wallet/{address}/openOrders HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of open orders chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-configuration) Get wallet configuration get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /wallet/{address}/configurationcopy Returns trading configuration for a wallet Path parameters addressstringRequiredExample: `0x6c51275fd01d5dbd2da194e92f920f8598306df2`Pattern: `^0x[a-fA-F0-9]{40}$` Responses chevron-right 200 Wallet configuration application/json Responseobject · WalletConfiguration Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /wallet/{address}/configuration HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Wallet configuration chevron-down [PreviousMarket Datachevron-left](https://docs.reya.xyz/developers/rest-api-reference/market-data) [NextOrder Entrychevron-right](https://docs.reya.xyz/developers/rest-api-reference/order-entry) Last updated 21 days ago * [GETGet wallet accounts](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-accounts) * [GETGet wallet perp executions](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-perpexecutions) * [GETGet wallet spot executions](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-spotexecutions) * [GETGet wallet positions](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-positions) * [GETGet wallet account balances](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-accountbalances) * [GETGet wallet open orders](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-openorders) * [GETGet wallet configuration](https://docs.reya.xyz/developers/rest-api-reference/wallet-data#get-wallet-address-configuration) Copy GET /v2/wallet/{address}/accounts HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "accountId": 1747927089946,\ "name": "Margin Account 1",\ "type": "MAINPERP",\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] Copy GET /v2/wallet/{address}/perpExecutions HTTP/1.1 Host: api.reya.xyz Accept: */* Copy { "data": [\ {\ "exchangeId": 1747927089946,\ "symbol": "BTCRUSDPERP",\ "accountId": 1747927089946,\ "qty": "1.0",\ "side": "B",\ "price": "43000.00",\ "fee": "43000.00",\ "type": "ORDER_MATCH",\ "timestamp": 1747927089946,\ "sequenceNumber": 1747927089946,\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ], "meta": { "limit": 1747927089946, "count": 1747927089946, "endTime": 1747927089946, "startTime": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" }, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy GET /v2/wallet/{address}/spotExecutions HTTP/1.1 Host: api.reya.xyz Accept: */* Copy { "data": [\ {\ "exchangeId": 1747927089946,\ "symbol": "BTCRUSDPERP",\ "accountId": 1747927089946,\ "makerAccountId": 1747927089946,\ "orderId": "63552420354981888",\ "makerOrderId": "63552420037263360",\ "side": "B",\ "qty": "1.0",\ "price": "43000.00",\ "fee": "43000.00",\ "type": "ORDER_MATCH",\ "timestamp": 1747927089946,\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ], "meta": { "limit": 1747927089946, "count": 1747927089946, "endTime": 1747927089946, "startTime": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" }, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy GET /v2/wallet/{address}/positions HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "exchangeId": 1747927089946,\ "symbol": "BTCRUSDPERP",\ "accountId": 1747927089946,\ "qty": "1.0",\ "side": "B",\ "avgEntryPrice": "43000.00",\ "avgEntryFundingValue": "43000.00",\ "lastTradeSequenceNumber": 1747927089946,\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] Copy GET /v2/wallet/{address}/accountBalances HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "accountId": 1747927089946,\ "asset": "BTCRUSDPERP",\ "realBalance": "1.0",\ "balanceDEPRECATED": "1.0",\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] Copy GET /v2/wallet/{address}/openOrders HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "exchangeId": 1747927089946,\ "symbol": "BTCRUSDPERP",\ "accountId": 1747927089946,\ "orderId": "123456789-123123123",\ "qty": "1.0",\ "execQty": "1.0",\ "cumQty": "1.0",\ "side": "B",\ "limitPx": "43000.00",\ "orderType": "TP",\ "triggerPx": "43000.00",\ "timeInForce": "GTC",\ "reduceOnly": false,\ "status": "OPEN",\ "createdAt": 1747927089946,\ "lastUpdateAt": 1747927089946,\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] Copy GET /v2/wallet/{address}/configuration HTTP/1.1 Host: api.reya.xyz Accept: */* Copy { "feeTierId": 1747927089946, "ogStatus": true, "affiliateStatus": false, "refereeStatus": false, "ANY_ADDITIONAL_PROPERTY": "anything" } --- # Models | Developers | Reya RequestError Show propertiesplus ServerError Show propertiesplus MarketDefinition Show propertiesplus SpotMarketDefinition Show propertiesplus AssetDefinition Show propertiesplus FeeTierParameters Show propertiesplus GlobalFeeParameters Show propertiesplus LiquidityParameters Show propertiesplus WalletConfiguration Show propertiesplus MarketSummary Show propertiesplus Position Show propertiesplus Order Show propertiesplus Account Show propertiesplus AccountBalance Show propertiesplus PerpExecutionList Show propertiesplus SpotExecutionList Show propertiesplus Price Show propertiesplus CandleHistoryData Show propertiesplus CreateOrderRequest Show propertiesplus CreateOrderResponse Show propertiesplus CancelOrderRequest Show propertiesplus CancelOrderResponse Show propertiesplus MassCancelRequest Show propertiesplus MassCancelResponse Show propertiesplus Depth Show propertiesplus ServerErrorCode Show propertiesplus Symbol Show propertiesplus UnsignedInteger Show propertiesplus UnsignedDecimal Show propertiesplus RequestErrorCode Show propertiesplus Asset Show propertiesplus SignedDecimal Show propertiesplus TierType Show propertiesplus Side Show propertiesplus ExecutionType Show propertiesplus PerpExecution Show propertiesplus PaginationMeta Show propertiesplus DepthType Show propertiesplus Level Show propertiesplus SpotExecution Show propertiesplus Address Show propertiesplus AccountType Show propertiesplus OrderType Show propertiesplus TimeInForce Show propertiesplus OrderStatus Show propertiesplus [PreviousOrder Entrychevron-left](https://docs.reya.xyz/developers/rest-api-reference/order-entry) [NextRate Limitschevron-right](https://docs.reya.xyz/developers/rest-api-reference/rate-limits) Last updated 21 days ago --- # Token Design | Reya [hashtag](https://docs.reya.xyz/reya-token/token-design#objectives) Objectives ----------------------------------------------------------------------------------- The REYA token is embedded into the broader Reya architecture in order to satisfy the following objectives: 1. **Network security**: secure the network through sustainable incentive structures for the network of operators required to run Reya Execution Nodes 2. **Fuel economic activity**: align the activity of the Reya Protocol with REYA and ETH holders 3. **Accountable, Ethereum‑native governance**: ensure sREYA holders receive additional benefits within Reya DEX alongside governance rights In the following sections, we go deeper into mechanisms and flows that implement these objectives. [PreviousContextchevron-left](https://docs.reya.xyz/reya-token/context) [NextNetwork Security and Economic Incentiveschevron-right](https://docs.reya.xyz/reya-token/token-design/network-security-and-economic-incentives) Last updated 2 months ago --- # Governance | Reya Reya is governed by sREYA holders. Through this process, governance sets the policies and parameters that keep the network safe, neutral, and sustainable, while remaining transparent and predictable for participants. Specifically, its scope includes the Insurance Fund policy, Assistance Fund policy, issuance schedules, trading fee parameters and risk parameter settings. In addition, governance configures the rollup slashing rules. [PreviousMonetary Policychevron-left](https://docs.reya.xyz/reya-token/token-design/monetary-policy) [NextsREYA Additional Utilitychevron-right](https://docs.reya.xyz/reya-token/token-design/sreya-additional-utility) Last updated 2 months ago --- # Context | Reya [hashtag](https://docs.reya.xyz/reya-token/context#building-ethereums-execution-layer) Building Ethereum’s execution layer ------------------------------------------------------------------------------------------------------------------------------- Settlement and execution are very distinct components of financial trading, each with its own specific challenges as well as security requirements. Because of this, monolithic L1s that try to satisfy both functions force false trade-offs that ultimately limit the growth and development of a truly decentralized financial system. These false trade-offs fall into the general ‘performance vs decentralization’ theme. At Reya, we strongly believe that the future of decentralized finance passes through Ethereum. Ethereum is unparalleled in terms of the security and decentralization assurances it offers as a settlement layer. Furthermore, it has benefited from the wide participation of contributors in various areas of expertise, resulting in a flexible and cutting-edge roadmap that incentivizes innovation across all areas of DeFi and crypto in general. Based rollups have been an important recent development. Rollups are key components in scaling Ethereum’s. They precisely offer the possibility of a divide-and-conquer approach to application/execution and settlement. However, L2s in their current form risk being centralized systems that aren’t credibly neutral and reliable long-term. This is the problem that based rollups tackle head-on: they allow for true expansion of Ethereum’s capabilities while inheriting its security and decentralization guarantees. [Based rollups—superpowers from L1 sequencing - Layer 2 - Ethereum Researcharrow-up-right](https://ethresear.ch/t/based-rollups-superpowers-from-l1-sequencing/15016) By being a based-rollup, Reya will specifically become an execution layer tailored to the microstructural properties of financial trading, bringing execution to unparalleled performance levels while still providing traders with full Ethereum assurances on their capital. ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2F3892139141-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGymvVw95ZlIikLljgnKB%252Fuploads%252FXvlgK5wecbNri0akqHTO%252FScreenshot%25202025-11-19%2520at%252011.39.19.png%3Falt%3Dmedia%26token%3Dd2aa4fe1-d162-4cb0-b187-89cc897be880&width=768&dpr=4&quality=100&sign=bdd718ea&sv=2) In a based-rollup, Ethereum L1 validators ultimately control transaction ordering. By anchoring sequencing to validators who restake ETH, Reya strengthens liveness and censorship resistance versus single‑sequencer designs while keeping the system tightly aligned with Ethereum. Ethereum validators can operate or delegate to high-performance nodes under a lookahead schedule that maps L1 slots to execution node identities, providing predictable and sticky leadership windows. Transactions follow two key confirmation levels: pre‑confirmed (execution receipt issued) and finalized (batched to L1). The rotating execution nodes process trades and issue millisecond pre-confirmations. They run Reya’s rust-based trading engine, which is cross-compiled into zero-knowledge circuits enabling asynchronous proof generation and independent stateless validation of state transitions. Orders and executions have different bandwidth needs, motivating Reya to adopt a hybrid data availability (DA) setup where account state updates are published to Ethereum using EIP‑4844 blobs, while high‑throughput order data leverages a specialized external DA provider. Execution misbehavior is deterred via slashing and provable discrepancies between signed pre‑confirmations and on‑chain data. Notably, Ethereum validators will also face penalties if the execution node they delegated to is slashed. [PreviousIntroductionchevron-left](https://docs.reya.xyz/chain/introduction) [NextToken Designchevron-right](https://docs.reya.xyz/reya-token/token-design) Last updated 2 months ago --- # Monetary Policy | Reya Reya’s has a fixed supply model of 8 Billion tokens. Initially, network participants are incentivized through Reya distributions. However, once all the supply is in circulation, new Reya tokens may only be minted should a corresponding number of tokens be burnt. These burnt tokens will come from the Assistance Fund, ensuring the fixed supply is maintained. [PreviousNetwork Security and Economic Incentiveschevron-left](https://docs.reya.xyz/reya-token/token-design/network-security-and-economic-incentives) [NextGovernancechevron-right](https://docs.reya.xyz/reya-token/token-design/governance) Last updated 2 months ago --- # sREYA Additional Utility | Reya Beyond the benefits described above, sREYA has a growing set of use cases for everyday participants on Reya. Staking REYA to mint sREYA can lower trading costs for those on Premium Accounts, through a tiered fee schedule, with tiers determined by the amount staked. In the medium-term, sREYA will also be recognized as collateral for trading on Reya, meaning positions backed by sREYA follow the same liquidation framework as other collateral types. [PreviousGovernancechevron-left](https://docs.reya.xyz/reya-token/token-design/governance) [NextAllocation & Release Schedulechevron-right](https://docs.reya.xyz/reya-token/allocation-and-release-schedule) Last updated 2 months ago --- # Reya Chain Points: FAQs | Reya [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#core-rcp-mechanics) Core RCP Mechanics ------------------------------------------------------------------------------------------------------------- #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#what-are-reya-chain-points) What are Reya Chain Points? Reya Chain Points (RCP) are the points system used to track meaningful contributions to ReyaChain across trading, staking, and community actions. They serve as the basis for distributing ownership in the network through the future airdrop. #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#how-many-rcp-are-there) How many RCP are there? ReyaChain Points have a fixed weekly supply. The supply will change slightly each week across the three actions of trading, staking and signal, particularly as trading activity grows. However, trading actions are generally the most rewarded given traders pay fees and take risk. #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#how-often-are-rcp-distributed) How often are RCP distributed? RCP is distributed weekly based on your activity across trading, staking, and signal. You’ll see your new points allocation each week, even if you didn’t earn any that cycle. #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#is-rcp-transferable-or-tradable) Is RCP transferable or tradable? No. RCP is non-transferable and not tradable. It’s designed purely to measure and reward contribution to the network. #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#is-there-a-leaderboard-for-rcp) Is there a leaderboard for RCP? Yes. The public leaderboard allows anyone to track their standing across all three tracks and see the top 20 RCP earners per week and in total. [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#how-to-earn-rcp) How to Earn RCP ------------------------------------------------------------------------------------------------------- #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#what-actions-earn-me-rcp) What actions earn me RCP? You can earn RCP through three tracks: * Trading: Trade any supported market on Reya * Staking: Convert rUSD into srUSD and hold it in your margin account or external third party applications for additional rewards * Signal: Contribute high-signal content or code that helps grow Reya — think trading tools, smart threads, or helping bring new whales onboard #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#how-is-rcp-weighted-between-trading-staking-and-signal) How is RCP weighted between Trading, Staking, and Signal? Trading carries the highest risk and rightly earns the highest weight, followed by staking. Signal is discretionary and designed to reward outsized contributions that drive real value to the ecosystem. #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#is-trading-the-most-heavily-weighted-activity) Is Trading the most heavily weighted activity? Yes. Trading is the primary engine of the protocol and traders carry the most risk, so it earns the majority of weekly points. The actions rewarded are generally focused on volume and open interest. But will vary week on week. #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#how-do-referrals-impact-rcp) How do referrals impact RCP? You earn 10% of the RCP earned by any wallet you refer. This doesn’t take anything away from them — it’s a bonus to you. You will also earn 10% of their trading fees, and the user you refer will enjoy a 10% discount in trading fees for themselves too. It’s a win-win. #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#can-i-earn-rcp-without-trading-or-staking) Can I earn RCP without trading or staking? Yes — through Signal. If you’re helping Reya grow through code, content, or connections, you can earn RCP. We recognise there are broader contributions than capital alone. #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#what-happens-if-i-stake-and-then-unstake-do-i-lose-future-rcp-eligibility) What happens if I stake and then unstake? Do I lose future RCP eligibility? If you unstake before the weekly snapshot, you won’t earn staking RCP for that week. Staked balances need to be in place at the time of snapshot to count. [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#product-design-and-transparency) Product Design and Transparency --------------------------------------------------------------------------------------------------------------------------------------- #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#how-do-you-ensure-fairness-in-rcp-distribution) How do you ensure fairness in RCP distribution? RCP is calculated based on actual impact — trading activity, staking balance, and meaningful community contributions. The system is designed to reward real engagement, not vanity metrics. Weekly distributions mean it’s always up to date and reflects recent effort. #### [hashtag](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#what-stops-people-from-sybil-attacking-rcp) What stops people from sybil attacking RCP? We actively monitor for sybil behavior and can exclude ineligible wallets from RCP rewards. The system also requires effort over time not just one-off actions making it costly to exploit. Alongside this, we will instruct a sybil analytics team to remove those suspected of sybil farming in advance of the community airdrop. This ensures more rewards go to real users. [PreviousAllocation & Release Schedulechevron-left](https://docs.reya.xyz/reya-token/allocation-and-release-schedule) [NextIntroductionchevron-right](https://docs.reya.xyz/native-stablecoin/introduction) Last updated 2 months ago * [Core RCP Mechanics](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#core-rcp-mechanics) * [How to Earn RCP](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#how-to-earn-rcp) * [Product Design and Transparency](https://docs.reya.xyz/reya-token/reya-chain-points-faqs#product-design-and-transparency) --- # Introduction | Reya ReyaChain is the next iteration of Reya - designed to provide millisecond-level trading speed, whilst inhereting Ethereum's security. We achieve this by being the first ever trading-specific based rollup. You can find the technical details here: [https://x.com/0xSimonJones/status/1944737748381839671arrow-up-right](https://x.com/0xSimonJones/status/1944737748381839671) Today, Reya uses a forked and heavily customised version of Arbitrum Orbit. The infrastructure upgrade - as Reya transitions from an optimistic rollup to a based rollup - will happen in stages without any impact to trading. [PreviousInsurance Fundschevron-left](https://docs.reya.xyz/trading/liquidation-engine/insurance-funds) [NextContextchevron-right](https://docs.reya.xyz/reya-token/context) Last updated 2 months ago --- # FAQs | Reya ### [hashtag](https://docs.reya.xyz/native-stablecoin/faqs#srusd-how-to-guide-and-faq) **srUSD: How-To Guide & FAQ** **srUSD** is a yield-bearing stablecoin on **ReyaChain** that lets you earn passive yield while using the same capital to trade. #### [hashtag](https://docs.reya.xyz/native-stablecoin/faqs#how-to-mint-srusd) **How to Mint srUSD** 1. **Access the Platform:** Navigate to [app.reya.xyzarrow-up-right](http://app.reya.xyz/) . 2. **Connect Your Wallet:** Ensure your wallet is connected and set to ReyaChain. 3. **Deposit USDC:** Transfer USDC into your account. 4. **Mint srUSD:** Use the deposited USDC to mint srUSD directly through the platform. 5. **Ready to Use:** Your srUSD is now earning yield and can be utilized as trading margin. #### [hashtag](https://docs.reya.xyz/native-stablecoin/faqs#understanding-srusd-yield) **Understanding srUSD Yield** * **Yield Generation:** srUSD holders earn yield derived from protocol fees within the Reya ecosystem, including trading and funding fees. Alongside yield generated by Reya’s unique “Liquidity Manager” model * **Automatic Accrual:** Yield accrues automatically; there is no need for staking or manual claiming. * **Stable Balance:** While your srUSD balance remains constant, its value appreciates through the accrued yield. #### [hashtag](https://docs.reya.xyz/native-stablecoin/faqs#utilizing-srusd) **Utilizing srUSD** * **Trading on Reya DEX:** Use srUSD as margin for trading perpetual futures on Reya DEX. * **Cross-Margin Support:** srUSD supports cross-margining, allowing a single balance to back multiple positions. * **Liquidity Provision:** Provide liquidity within the Reya ecosystem using srUSD. #### [hashtag](https://docs.reya.xyz/native-stablecoin/faqs#key-benefits) **Key Benefits** * **Dual Functionality:** srUSD combines yield generation with trading utility. * **Capital Efficiency:** Maximize the utility of your assets by earning yield while maintaining trading capability. * **Seamless Integration:** srUSD is designed to work natively within the Reya ecosystem, ensuring smooth operations. ### [hashtag](https://docs.reya.xyz/native-stablecoin/faqs#multi-account-safety-how-margin-accounts-work) Multi-Account Safety: How Margin Accounts Work Reya supports **multiple margin accounts**, each siloed from one another. So if you're holding srUSD in **Account A** and trading with leverage in **Account B**, your balance in **Account A is NOT at risk** from trades made in B. **Only the srUSD in the margin account you trade from is exposed to PnL.** This gives you more control over risk and capital allocation. ### [hashtag](https://docs.reya.xyz/native-stablecoin/faqs#faq) ❓ **FAQ** **Q: What’s the difference between rUSD and srUSD?** rUSD is used for LP staking and earning protocol rewards. srUSD is a **yield-bearing stablecoin** designed for trading and margin use. **Q: Can I convert srUSD back to rUSD?** Yes. You can redeem srUSD back into **rUSD** at any time via the dApp. **Q: Do I need to move srUSD to a special account to earn yield?** No. Yield accrues automatically—just by holding srUSD in your wallet or account. **Q: Has srUSD been audited?** Yes. srUSD has been fully audited as part of Reya’s security framework. **Q: Are there RCP incentives for using srUSD?** Currently, RCP accrues at the standard rate. Additional boosts are available if you hold srUSD in your margin account. **Q: Is srUSD available outside of ReyaChain?** Not yet. srUSD is native to ReyaChain and integrated into its ecosystem. [PrevioussrUSDchevron-left](https://docs.reya.xyz/native-stablecoin/srusd) [NextAuditschevron-right](https://docs.reya.xyz/technical-docs/audits) Last updated 2 months ago * [srUSD: How-To Guide & FAQ](https://docs.reya.xyz/native-stablecoin/faqs#srusd-how-to-guide-and-faq) * [Multi-Account Safety: How Margin Accounts Work](https://docs.reya.xyz/native-stablecoin/faqs#multi-account-safety-how-margin-accounts-work) * [❓ FAQ](https://docs.reya.xyz/native-stablecoin/faqs#faq) --- # Ranked liquidations | Reya The first level is the open bidding process, during which bidder will submit a series of volumes {Qi}\\{Q\_i\\}{Qi​} that they are willing to take on from the liquidated account, as well as a percentage of the resulting change in LMR that they request as reward. The open competitive process should ensure that the reward parameter is optimized. ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FGymvVw95ZlIikLljgnKB%2Fblobs%2FgNkZVKQAtjhfswH9C0dl%2Fimage.png&width=768&dpr=4&quality=100&sign=85a3d56e&sv=2) The other cornerstone for this procedure is a scoring function used for liquidation bids, which summarizes the reward parameter and the market impact. For a bid requesting volumes {Qi}\\{Q\_i\\}{Qi​} of nnn assets for a reward parameter ddd, the score is score({Qi},d)\=1n(w(1−d)+(1−w)∑iQi×pSlippagei((Qi(Qi,max−Qi))1/2)∑iQi)\\mathrm{score}(\\{Q\_i\\},d) = \\frac{1}{n}\\left(w(1-d) + (1-w)\\frac{\\sum\_i Q\_i \\times\\mathrm{pSlippage}i\\left((Q\_i(Q{i,max}-Q\_i))^{1/2}\\right)}{\\sum\_i Q\_i}\\right)score({Qi​},d)\=n1​(w(1−d)+(1−w)∑i​Qi​∑i​Qi​×pSlippagei((Qi​(Qi,max−Qi​))1/2)​) where pSlippagei(Q)\=ϕQβ/pricei\\mathrm{pSlippage}\_i(Q)=\\phi Q^\\beta/\\mathrm{price}\_ipSlippagei​(Q)\=ϕQβ/pricei​ is the estimated percentual price slippage (using governance set parameters). An important feature is of this scoring function is that it disincentives over-liquidations by multiplying by 1/n1/n1/n (which in practice stratifies bids according to the number of requested assets), as well as maxing out the slippage benefit at half the available volume. [PreviousLiquidation Enginechevron-left](https://docs.reya.xyz/trading/liquidation-engine) [NextDutch auctionchevron-right](https://docs.reya.xyz/trading/liquidation-engine/dutch-auction) --- # Network Security and Economic Incentives | Reya 1. The Insurance Fund serves as a risk buffer to maintain protocol solvency 2. The Assistance Fund (AF) serves as the policy module for REYA and ETH buybacks 3. sReya holders stake REYA to delegate execution rights to execution node operators 4. Ethereum validators re-stake ETH to delegate sequencing to execution node operators ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2F3892139141-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGymvVw95ZlIikLljgnKB%252Fuploads%252FMXztG3h1uaD7utF2FWFw%252FScreenshot%25202025-11-19%2520at%252011.47.02.png%3Falt%3Dmedia%26token%3D357e1ea2-79c7-4e08-9ab6-6b1836087cc7&width=768&dpr=4&quality=100&sign=a9a31104&sv=2) **Insurance fund** serves as a risk reserve to maintain protocol solvency during adverse market conditions, with governance-defined rules for deployment and replenishment priorities. It is also capitalised through a governance-set allocation from trading fees, liquidation fees, and RLP staking yield. **Assistance Fund (AF)** receives a governance set allocation from trading fees, liquidation fees, and yield generated by RLP. The AF executes open-market purchases targeting an 80% REYA, 20% ETH split by mark-to-market value at the time of purchase. In this setup, governance is responsible for defining the execution cadence and safeguards around the buybacks (e.g. TWAP windows). Governance is also responsible for deciding when the AF should start receiving fees, with the option to keep sharing fees with front-ends and RLP to accelerate growth in the early stages of Reya. **REYA stakers** stake REYA on Ethereum mainnet, thereby delegating execution responsibilities to an execution node operator of their choice. They are incentivised through: * REYA distributions * Trading fee discounts * Governance rights proportional to their stake * The ability to use sREYA as trading collateral, in the medium term It is important to note that the REYA stakers earn yield in REYA terms, and their realized yield is a function of network activity as well as the TVL of the staking contract. Ethereum validators need to re-stake their ETH to delegate sequencing to execution node operators according to the based lookahead schedule governing the execution node rotation. They are incentivised through: * REYA distributions Correlated penalties between Reya stakers and Ethereum validators are defined and enforced on Ethereum, reinforcing careful operator selection and neutral, reliable sequencing. This design grounds Reya’s security directly to Ethereum while ensuring that value created through trading and RLP staking flows back into the Reya ecosystem. [PreviousToken Designchevron-left](https://docs.reya.xyz/reya-token/token-design) [NextMonetary Policychevron-right](https://docs.reya.xyz/reya-token/token-design/monetary-policy) Last updated 1 month ago --- # Liquidation Engine | Reya Liquidations are the procedures through which Reya cuts positions off to stop accounts from accumulating losses larger than their margin balance. They are triggered whenever the liquidation margin requirement (LMR) is breached for a bubble. In the presence of cross-margining, for a given settlement token TTT we need to verify the LMR both at the ‘local’ NDeltaT\=BBalT−LMRT≤0\\mathrm{NDelta}\_T=\\mathrm{BBal}\_T-\\mathrm{LMR}\_T\\leq 0NDeltaT​\=BBalT​−LMRT​≤0 as well as the ‘global’ level: NDeltaUSD\=∑ST′\>0(1−haircutT)XT′/USDST′≤0\\mathrm{NDelta}{USD}=\\sum{S\_{T'}>0}(1-\\mathrm{haircut}T)X{T'/USD}S\_{T'}\\leq 0NDeltaUSD\=∑ST′​\>0(1−haircutT)XT′/USDST′​≤0 where . Essentially, even if a bubble cannot satisfy the LMR autonomously, we check if there are funds in the other bubbles that can be auto-exchanged. [hashtag](https://docs.reya.xyz/trading/liquidation-engine#the-liquidation-waterfall) The liquidation waterfall -------------------------------------------------------------------------------------------------------------------- _Reya Network introduces a series of liquidation features that guarantee the health of its collateral pool for the first time on-chain._ These are all gathered in an innovative waterfall structure, each lower layer being deployed as the account’s health worsens: 1. **Open bidding**, where in anticipation of LMR breach, liquidators submit liquidations proposals that get filtered, ranked and executed once LMR actually is breached, where the ranking takes into account both the requested discount and the liquidity profile of the requested assets, and is designed to disincentivize over-liquidations; 2. **Dutch auction**, where liquidation bids are immediately accepted at a given margin reward (risk-weighted discount), and which is activated if the open bidding was insufficient to bring an account back to health, or if the LMR was breached directly. 3. Pushing positions onto backstop LPs, who provide a liquidity pool against which to push the portfolio when the margin balance falls below a threshold level; 4. Auto-deleveraging, where losses are socialized: the system tries to act early enough so that only other users’ potential PnL will be curtailed (by pushing positions at market prices with insolvencies covered by the insurance funds), but will also socialize losses in last resort (by pushing positions at the bankruptcy price. In other words, the waterfall serves as a series of backstops to ensure that the account can be fully liquidated while preserving the pool’s health. The important design choices are: * By introducing the concept of maintenance margin as distinct from liquidation margin, Reya Network allows for price optimization while maintaining speedy liquidations once the accounts threaten insolvency. * Liquidations within Reya always work through position transfer to particular parties, in practice outsourcing the optimization of unwinding cross-margined exposures to liquidators: the Protocol is able to organically grow in scope as portfolios and liquidators become more sophisticated. * Positions are always transferred by referencing the price index: as explained above, this ensures the coherence between margin requirements, marking to market, and liquidation losses. * Untrusted liquidators are compensated with a margin balance (’cash’) transfer proportion to the reduction in LMR. In this way, no untrusted liquidator can cause the account to lose more than the LMR, which should prevent different types of attacks. Also, the liquidator’s reward being in ‘cash’ (rather than a discount on price index) should incentivize them, since it means their liquidation profits are always immediately realized. ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FGymvVw95ZlIikLljgnKB%2Fblobs%2F7M1f7YRjy1xyZeq4MLa6%2Fimage.png&width=768&dpr=4&quality=100&sign=2937d133&sv=2) [PreviousAuto-exchange mechanismchevron-left](https://docs.reya.xyz/trading/cross-collateralization/auto-exchange-mechanism) [NextRanked liquidationschevron-right](https://docs.reya.xyz/trading/liquidation-engine/ranked-liquidations) Last updated 11 months ago --- # Introduction | Reya **rUSD is wrapped USDC and will be renamed as USDC to avoid confusion.** **srUSD** is the the liquidity provisioning token native to Reya's design. You can stake your rUSD and earn superior yield from providing liquidity to the DEX. [PreviousReya Chain Points: FAQschevron-left](https://docs.reya.xyz/reya-token/reya-chain-points-faqs) [NextsrUSDchevron-right](https://docs.reya.xyz/native-stablecoin/srusd) Last updated 2 months ago --- # Order Entry | Developers | Reya Order entry operations ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/order-entry#post-createorder) Create order post https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /createOrdercopy Create a new order (IOC, GTC, SL, TP) Body application/jsonchevron-down application/json exchangeIdintegerRequiredExample: `1747927089946` symbolstringOptional Trading symbol (e.g., BTCRUSDPERP, WETHRUSD) Example: `BTCRUSDPERP`Pattern: `^[A-Za-z0-9]+$` accountIdintegerRequiredExample: `1747927089946` isBuybooleanRequired Whether this is a buy order Example: `true` limitPxstringRequiredExample: `43000.00`Pattern: `^-?\d+(\.\d+)?([eE][+-]?\d+)?$` qtystringOptionalExample: `1.0`Pattern: `^\d+(\.\d+)?([eE][+-]?\d+)?$` orderTypestring · enumRequired Order type, (LIMIT = Limit, TP = Take Profit, SL = Stop Loss) Example: `LIMIT`Possible values: `LIMIT``TP``SL` timeInForcestring · enumOptional Order time in force, exclusively used for LIMIT orders Example: `GTC`Possible values: `IOC``GTC` triggerPxstringOptional Trigger price, only for TP/SL orders Example: `43000.00`Pattern: `^-?\d+(\.\d+)?([eE][+-]?\d+)?$` reduceOnlybooleanOptional Whether this is a reduce-only order, exclusively used for LIMIT IOC orders. Example: `false` signaturestringRequired See signatures and nonces section for more details on how to generate. Example: `0x1234...` noncestringRequired Order nonce, see signatures and nonces section for more details. Example: `1234567890` signerWalletstringRequiredExample: `0x6c51275fd01d5dbd2da194e92f920f8598306df2`Pattern: `^0x[a-fA-F0-9]{40}$` expiresAfterintegerOptional Expiration timestamp (exclusively for PERP IOC orders and all SPOT orders). In seconds since epoch. The order will only be filled before this timestamp. Example: `1747927089946` clientOrderIdintegerOptional Client-provided order ID for tracking and correlation. Optional field that allows clients to assign their own unique identifier to orders. Example: `1747927089946` Other propertiesanyOptional Responses chevron-right 200 Order creation response application/json Responseobject · CreateOrderResponse Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json post /createOrder HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Order creation response chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/order-entry#post-cancelorder) Cancel order post https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /cancelOrdercopy Cancel an existing order Body application/jsonchevron-down application/json orderIdstringOptional Internal matching engine order ID to cancel. Provide either orderId OR clientOrderId, not both. For spot markets, this is the order ID returned in the CreateOrderResponse. Example: `490346525705109504` clientOrderIdintegerOptional Client-provided order ID for tracking and correlation. Provide either orderId OR clientOrderId, not both. This is the same clientOrderId provided in CreateOrderRequest. Example: `1747927089946` accountIdintegerOptional Account ID that owns the order. Required for spot markets. Example: `1747927089946` symbolstringOptional Market symbol for the order.Required for spot market orders. If not provided, assumes perp market for backwards compatibility. Example: `BTCRUSDPERP`Pattern: `^[A-Za-z0-9]+$` signaturestringRequired See signatures section for more details on how to generate. Example: `0x5678...` noncestringOptional See signatures and nonces section for more details. Compulsory for spot orders. Example: `1234567890` expiresAfterintegerOptional Expiration timestamp (exclusively for SPOT orders). In seconds since epoch. Example: `1747927089946` Other propertiesanyOptional Responses chevron-right 200 Order cancellation response application/json Responseobject · CancelOrderResponse Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json post /cancelOrder HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Order cancellation response chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/order-entry#post-cancelall) Cancel all orders post https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /cancelAllcopy Cancel all orders matching the specified filters (mass cancel) Body application/jsonchevron-down application/json Request to cancel all orders matching the specified filters accountIdintegerRequired Account ID to cancel orders for. Example: `1747927089946` symbolstringOptional Symbol to cancel orders for. If not specified, cancels orders for all symbols. Example: `BTCRUSDPERP`Pattern: `^[A-Za-z0-9]+$` signaturestringRequired See signatures and nonces section for more details on how to generate. Example: `0x1234...` noncestringRequired See signatures and nonces section for more details. Example: `1234567890` expiresAfterintegerRequired Expiration timestamp. In seconds since epoch. Example: `1747927089946` Other propertiesanyOptional Responses chevron-right 200 Mass cancel response application/json Responseobject · MassCancelResponse Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json post /cancelAll HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Mass cancel response chevron-down [PreviousWallet Datachevron-left](https://docs.reya.xyz/developers/rest-api-reference/wallet-data) [NextModelschevron-right](https://docs.reya.xyz/developers/rest-api-reference/models) Last updated 21 days ago * [POSTCreate order](https://docs.reya.xyz/developers/rest-api-reference/order-entry#post-createorder) * [POSTCancel order](https://docs.reya.xyz/developers/rest-api-reference/order-entry#post-cancelorder) * [POSTCancel all orders](https://docs.reya.xyz/developers/rest-api-reference/order-entry#post-cancelall) Copy POST /v2/createOrder HTTP/1.1 Host: api.reya.xyz Content-Type: application/json Accept: */* Content-Length: 406 { "exchangeId": 1747927089946, "symbol": "BTCRUSDPERP", "accountId": 1747927089946, "isBuy": true, "limitPx": "43000.00", "qty": "1.0", "orderType": "LIMIT", "timeInForce": "GTC", "triggerPx": "43000.00", "reduceOnly": false, "signature": "0x1234...", "nonce": "1234567890", "signerWallet": "0x6c51275fd01d5dbd2da194e92f920f8598306df2", "expiresAfter": 1747927089946, "clientOrderId": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy { "status": "OPEN", "execQty": "1.0", "cumQty": "1.0", "orderId": "123456789-123123123", "clientOrderId": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy POST /v2/cancelOrder HTTP/1.1 Host: api.reya.xyz Content-Type: application/json Accept: */* Content-Length: 222 { "orderId": "490346525705109504", "clientOrderId": 1747927089946, "accountId": 1747927089946, "symbol": "BTCRUSDPERP", "signature": "0x5678...", "nonce": "1234567890", "expiresAfter": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy { "status": "OPEN", "orderId": "123456789-123123123", "clientOrderId": "123456789", "ANY_ADDITIONAL_PROPERTY": "anything" } Copy POST /v2/cancelAll HTTP/1.1 Host: api.reya.xyz Content-Type: application/json Accept: */* Content-Length: 161 { "accountId": 1747927089946, "symbol": "BTCRUSDPERP", "signature": "0x1234...", "nonce": "1234567890", "expiresAfter": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy { "cancelledCount": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" } --- # Audits | Reya [hashtag](https://docs.reya.xyz/technical-docs/audits#abdk) ABDK --------------------------------------------------------------------- file-pdf 7MB [ABDK-AuditReportPart1.pdf](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/6nbWvxgdpqzO5X8vc33U/ABDK-AuditReportPart1.pdf) PDF downloadDownload[arrow-up-right-from-squareOpen](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/6nbWvxgdpqzO5X8vc33U/ABDK-AuditReportPart1.pdf) file-pdf 5MB [ABDK-AuditReportPart2.pdf](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/1B78wsItHMfhcB9h5yl2/ABDK-AuditReportPart2.pdf) PDF downloadDownload[arrow-up-right-from-squareOpen](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/1B78wsItHMfhcB9h5yl2/ABDK-AuditReportPart2.pdf) file-pdf 5MB [ABDK-AuditReportPart3.pdf](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/AdNolJT5ZDYG8gGaPwgv/ABDK-AuditReportPart3.pdf) PDF downloadDownload[arrow-up-right-from-squareOpen](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/AdNolJT5ZDYG8gGaPwgv/ABDK-AuditReportPart3.pdf) [hashtag](https://docs.reya.xyz/technical-docs/audits#pashov) Pashov ------------------------------------------------------------------------- file-pdf 1MB [Pashov-AuditReport.pdf](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/HUL8pPXtNrPANH1Dfz14/Pashov-AuditReport.pdf) PDF downloadDownload[arrow-up-right-from-squareOpen](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/HUL8pPXtNrPANH1Dfz14/Pashov-AuditReport.pdf) file-pdf 2MB [Pashov-AuditReport2.pdf](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/CV8K2nLqGB6CtR21ZWM3/Pashov-AuditReport2.pdf) PDF downloadDownload[arrow-up-right-from-squareOpen](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/CV8K2nLqGB6CtR21ZWM3/Pashov-AuditReport2.pdf) file-pdf 668KB [Pashov-AuditReport3.pdf](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/ASIMzg1Le5Hu1XZSelXT/Pashov-AuditReport3.pdf) PDF downloadDownload[arrow-up-right-from-squareOpen](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/ASIMzg1Le5Hu1XZSelXT/Pashov-AuditReport3.pdf) file-pdf 668KB [Pashov-AuditReport4.pdf](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/NtzZpnWdaXZagZgrFtCD/Pashov-AuditReport4.pdf) PDF downloadDownload[arrow-up-right-from-squareOpen](https://content.gitbook.com/content/GymvVw95ZlIikLljgnKB/blobs/NtzZpnWdaXZagZgrFtCD/Pashov-AuditReport4.pdf) [PreviousFAQschevron-left](https://docs.reya.xyz/native-stablecoin/faqs) Last updated 1 year ago * [ABDK](https://docs.reya.xyz/technical-docs/audits#abdk) * [Pashov](https://docs.reya.xyz/technical-docs/audits#pashov) --- # srUSD | Reya [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#what-is-rusd-staking) What is rUSD staking? -------------------------------------------------------------------------------------------------------- **The power of diversification** **On-chain liquidity provision mechanisms are generally siloed and application specific. Reya’s unified liquidity model makes it possible for capital to be allocated in a diversified manner, improving its risk profile orders of magnitude over what you can find elsewhere in DeFi.** #### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#shared-liquidity) **Shared liquidity** Reya introduced a model of unified liquidity which allows LP capital to be dynamically allocated to the best opportunity. The AMM model, in particular, relies on a single pool of capital to provide liquidity across all markets, while safely weighing them according to their risk profile. This allows it to provide superior depth, with use cases as a DeFi internalized ‘hedging venue’ with CEX-like execution. #### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#bridging-defi-and-cefi) **Bridging DeFi and CeFi** Reya introduced a Liquidity Manager framework, through which Network Liquidity is allocated for different uses through smart contracts or partners. Institutional partners Amber Group and Selini Capital joined efforts with Reya to showcase how this can unlock superior returns for LPs, while also being ‘weaponized’ for Network growth. ### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#current-managers) Current Managers Liquidity Managers can be both on-chain protocols or active institutional managers. Their allocation of assets is subject to a clear mandate, although it includes some discretionarity. ### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#allocations) **Allocations** ### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#reyas-risk-adjusted-returns-outperform-market-benchmarks) Reya’s risk-adjusted returns outperform market benchmarks Liquidity Managers broadly provide two types of strategy: market neutral ones through cash & carry trades and/or cross-exchange arbitrages; and liquidity provisioning ones (currently, Reya’s AMM supports perp trading on Reya DEX). #### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#consistently-high-returns-with-minimal-drawdowns) **Consistently High Returns with minimal drawdowns** The POC of the unified liquidity framework has proven itself not only resilient, but thriving amid the extreme volatility since its roll out in early December 2024. **Averaging a 10.45% APY, it has had only 6 negative days, with APY over negative days averaging only -0.99% (or a -0.27bp drawdown).** ### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#risks-associated-with-rusd-staking) Risks associated with rUSD staking All financial products carry a certain degree of risk, and even low risk investment strategies contain an element of uncertainty. Different instruments involve different levels of exposure to risk and you should be aware of the risks associated with each of these instruments. The information contained in this brochure is a general description of the risks associated with the specific products or services which we may provide to you. You should not rely on the highlighted risks as being the only risks in relation to the product or service. You should always satisfy yourself that a product or service is suitable for you in light of your financial circumstances and that you fully understand the nature and risk associated with that product or service. Any risks highlighted are not to be relied upon as investment advice or a personal recommendation. #### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#market-risk) **Market risk** Staked rUSD is exposed to market risk, due to the movement of token prices. * Funding rates are not necessarily positive. Prolonged periods of negative rates would pose a risk to the staked capital. Among other criteria, Reya selects the tokens for this strategy so as to minimize the risk of such episodes. * While the AMM nets out exposure as the trading flow oscillates between the different sides, it still holds some exposure and market movements may cause losses to the capital. The trading fees compensate for this possibility, as well as the mechanism design which shifts incentives as needed to rebalance the pool. #### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#smart-contract-risk) **Smart contract risk** Staked rUSD is works through smart contracts on Reya Network. Reya smart contracts undergo a rigorous development process with both internal and external audits, however any smart contract has specific risks associated with possible loopholes or bugs in their logic. A full list of audits can be found at: [https://docs.reya.xyz/technical-docs/auditsarrow-up-right](https://docs.reya.xyz/technical-docs/audits) #### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#counterparty-risk) **Counterparty risk** Staked rUSD is subject to counterparty risk in two main respects: * Funds are apportioned among the Liquidity Managers (Selini and Amber), and therefore their management and solvency might affect the staked rUSD. The delegation of funds to Liquidity Managers is done through legal agreements ensure the segregation of staked rUSD funds from their general capital, and, where possible, manage the allocation of capital through on-chain custodial solutions (in particular, CEFU and Fordefi) to ensure the safety of the funds. * The strategies employed in staked rUSD imply trades on centralized exchanges, and therefore are subject to counterparty risk of those exchanges. Extreme insolvency of the exchanges could impact the funds locked as margin. #### [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#exchange-risk) **Exchange risk** All settlement amounts on Reya Network are denominated in rUSD, which is a wrapped version of USDC. This means that capital is at risk in the event of a USDC de-peg v USD. [hashtag](https://docs.reya.xyz/native-stablecoin/srusd#using-srusd-to-trade) Using srUSD to trade ------------------------------------------------------------------------------------------------------- Whenever you stake rUSD, your deposit is _tokenized_. In other words, you receive a new token — srUSD — which represents your deposit. The conversion between these two tokens depends on the price of srUSD, which changes over time according to the returns of Network Liquidity. So if Network Liquidity has a 1% return, then srUSD becomes 1% more expensive; conversely, if Network Liquidity suffers a 1% loss, then srUSD will be 1% cheaper. ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2F3892139141-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGymvVw95ZlIikLljgnKB%252Fuploads%252FRW6z5CoX84qc7KV7NCG6%252Fimage.png%3Falt%3Dmedia%26token%3D2989f389-e305-4a93-99a5-f2c8612c270c&width=768&dpr=4&quality=100&sign=9ee4d7cf&sv=2) You cannot trade your srUSD, because it is for now non-transferrable. But you _can_ use your srUSD as collateral for trading by moving it to your margin accounts. The margin engine will recognize these tokens and count them towards your margin balance (denominated in rUSD) using the srUSD price _with a haircut_. What this means is that not all the value of your srUSD counts towards the margin balance because of the price risk of srUSD; instead, a small percentage, e.g. 10%, is ignored, and only the rest is counted towards the margin balance. So, in the following example, while your account has a total asset value of 202 rUSD, you can only lock up to 190.90 rUSd as margin for your trading. ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2F3892139141-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGymvVw95ZlIikLljgnKB%252Fuploads%252FQWncrfqTAPCn6IdRBAJ8%252Fimage.png%3Falt%3Dmedia%26token%3D8478f28d-25c2-45b6-b241-be08d9e48505&width=768&dpr=4&quality=100&sign=8871aff9&sv=2) Whenever you use any non-rUSD collateral, you need to be mindful of the fact that PnL still settles in rUSD. What this means is that all your profits will be delivered in rUSD, _and so will your losses be paid out._ So, if you suffer losses but you do not have any actual rUSD to cover them, the liquidation engine will forcefully sell a portion of your collateral at a discount. Given how closely integrated srUSD is with the Network, for srUSD this discount is set to zero. Using a flash swap functionality (which allows for swaps of assets with deferred IM checks), the cross-collateralization system goes and redeems srUSD for the underlying rUSD whenever needed. You can learn more about cross-collateralization and collateral liquidations [`here`arrow-up-right](https://docs.reya.xyz/reya-products/reyadex/trading-on-reya-dex/auto-exchange-and-liquidations) . [PreviousIntroductionchevron-left](https://docs.reya.xyz/native-stablecoin/introduction) [NextFAQschevron-right](https://docs.reya.xyz/native-stablecoin/faqs) Last updated 2 months ago * [What is rUSD staking?](https://docs.reya.xyz/native-stablecoin/srusd#what-is-rusd-staking) * [Current Managers](https://docs.reya.xyz/native-stablecoin/srusd#current-managers) * [Allocations](https://docs.reya.xyz/native-stablecoin/srusd#allocations) * [Reya’s risk-adjusted returns outperform market benchmarks](https://docs.reya.xyz/native-stablecoin/srusd#reyas-risk-adjusted-returns-outperform-market-benchmarks) * [Risks associated with rUSD staking](https://docs.reya.xyz/native-stablecoin/srusd#risks-associated-with-rusd-staking) * [Using srUSD to trade](https://docs.reya.xyz/native-stablecoin/srusd#using-srusd-to-trade) --- # Market Data | Developers | Reya Prices, market-level trades, depth, candles, etc. ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-markets-summary) Get market summaries get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /markets/summarycopy Statistics and throttled market data for all markets. Recalculated every 0.5s Responses chevron-right 200 List of market summaries application/json Responseobject · MarketSummary\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /markets/summary HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of market summaries chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-market-symbol-summary) Get market summary get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /market/{symbol}/summarycopy Statistics and throttled data for a specific market. Recalculated every 0.5s Path parameters symbolstringRequired Trading symbol (e.g., BTCRUSDPERP, WETHRUSD) Example: `BTCRUSDPERP`Pattern: `^[A-Za-z0-9]+$` Responses chevron-right 200 Market summary application/json Responseobject · MarketSummary Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /market/{symbol}/summary HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Market summary chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-prices) Get all prices get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /pricescopy Responses chevron-right 200 List of prices application/json Responseobject · Price\[\] Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /prices HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of prices chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-prices-symbol) Get price by symbol get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /prices/{symbol}copy Path parameters symbolstringRequired Trading symbol (e.g., BTCRUSDPERP, WETHRUSD) Example: `BTCRUSDPERP`Pattern: `^[A-Za-z0-9]+$` Responses chevron-right 200 Price information application/json Responseobject · Price Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /prices/{symbol} HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Price information chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-market-symbol-perpexecutions) Get perp executions for market get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /market/{symbol}/perpExecutionscopy Returns up to 100 perp executions for a given market. Path parameters symbolstringRequired Trading symbol (e.g., BTCRUSDPERP, WETHRUSD) Example: `BTCRUSDPERP`Pattern: `^[A-Za-z0-9]+$` Query parameters startTimeintegerOptional Return results after this sequence number (for pagination) Example: `1747927089946` endTimeintegerOptional Return results before this sequence number (for pagination) Example: `1747927089946` Responses chevron-right 200 List of perp executions application/json Responseobject · PerpExecutionList Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /market/{symbol}/perpExecutions HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of perp executions chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-market-symbol-depth) Get market depth snapshot get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /market/{symbol}/depthcopy Returns an L2 order book snapshot with aggregated price levels for the specified market. Path parameters symbolstringRequired Trading symbol (e.g., BTCRUSDPERP, WETHRUSD) Example: `BTCRUSDPERP`Pattern: `^[A-Za-z0-9]+$` Responses chevron-right 200 Depth snapshot application/json Responseobject · Depth Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /market/{symbol}/depth HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Depth snapshot chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-market-symbol-spotexecutions) Get spot executions for market get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /market/{symbol}/spotExecutionscopy Returns up to 100 spot executions for a given market. Path parameters symbolstringRequired Trading symbol (e.g., BTCRUSDPERP, WETHRUSD) Example: `BTCRUSDPERP`Pattern: `^[A-Za-z0-9]+$` Query parameters startTimeintegerOptional Return results after this sequence number (for pagination) Example: `1747927089946` endTimeintegerOptional Return results before this sequence number (for pagination) Example: `1747927089946` Responses chevron-right 200 List of spot executions application/json Responseobject · SpotExecutionList Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /market/{symbol}/spotExecutions HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 List of spot executions chevron-down ### [hashtag](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-candlehistory-symbol-resolution) Get historical candles get https://api.reya.xyz/v2Production serverchevron-down https://api.reya.xyz/v2https://api-test.reya.xyz/v2 /candleHistory/{symbol}/{resolution}copy Returns up to 200 candles for a given market, sorted by time in descending order, and ending at the specified end time. Path parameters symbolstringRequired Trading symbol (e.g., BTCRUSDPERP, WETHRUSD) Example: `BTCRUSDPERP`Pattern: `^[A-Za-z0-9]+$` resolutionstring · enumRequired Candle resolution Example: `1m`Possible values: `1m``5m``15m``30m``1h``4h``1d` Query parameters endTimeintegerOptional Return results before this sequence number (for pagination) Example: `1747927089946` Responses chevron-right 200 Historical candle data application/json Responseobject · CandleHistoryData Show propertiesplus chevron-right 400 Bad request application/json chevron-right 500 Internal server error application/json get /candleHistory/{symbol}/{resolution} HTTPchevron-down HTTPcURLJavaScriptPython Test it 200 Historical candle data chevron-down [PreviousReference Datachevron-left](https://docs.reya.xyz/developers/rest-api-reference/reference-data) [NextWallet Datachevron-right](https://docs.reya.xyz/developers/rest-api-reference/wallet-data) Last updated 21 days ago * [GETGet market summaries](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-markets-summary) * [GETGet market summary](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-market-symbol-summary) * [GETGet all prices](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-prices) * [GETGet price by symbol](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-prices-symbol) * [GETGet perp executions for market](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-market-symbol-perpexecutions) * [GETGet market depth snapshot](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-market-symbol-depth) * [GETGet spot executions for market](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-market-symbol-spotexecutions) * [GETGet historical candles](https://docs.reya.xyz/developers/rest-api-reference/market-data#get-candlehistory-symbol-resolution) Copy GET /v2/markets/summary HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "symbol": "BTCRUSDPERP",\ "updatedAt": 1747927089946,\ "longOiQty": "1.0",\ "shortOiQty": "1.0",\ "oiQty": "1.0",\ "fundingRate": "43000.00",\ "longFundingValue": "43000.00",\ "shortFundingValue": "43000.00",\ "fundingRateVelocity": "43000.00",\ "volume24h": "1.0",\ "pxChange24h": "43000.00",\ "throttledOraclePrice": "43000.00",\ "throttledPoolPrice": "43000.00",\ "pricesUpdatedAt": 1747927089946,\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] Copy GET /v2/market/{symbol}/summary HTTP/1.1 Host: api.reya.xyz Accept: */* Copy { "symbol": "BTCRUSDPERP", "updatedAt": 1747927089946, "longOiQty": "1.0", "shortOiQty": "1.0", "oiQty": "1.0", "fundingRate": "43000.00", "longFundingValue": "43000.00", "shortFundingValue": "43000.00", "fundingRateVelocity": "43000.00", "volume24h": "1.0", "pxChange24h": "43000.00", "throttledOraclePrice": "43000.00", "throttledPoolPrice": "43000.00", "pricesUpdatedAt": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy GET /v2/prices HTTP/1.1 Host: api.reya.xyz Accept: */* Copy [\ {\ "symbol": "BTCRUSDPERP",\ "oraclePrice": "43000.00",\ "poolPrice": "43000.00",\ "updatedAt": 1747927089946,\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ] Copy GET /v2/prices/{symbol} HTTP/1.1 Host: api.reya.xyz Accept: */* Copy { "symbol": "BTCRUSDPERP", "oraclePrice": "43000.00", "poolPrice": "43000.00", "updatedAt": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy GET /v2/market/{symbol}/perpExecutions HTTP/1.1 Host: api.reya.xyz Accept: */* Copy { "data": [\ {\ "exchangeId": 1747927089946,\ "symbol": "BTCRUSDPERP",\ "accountId": 1747927089946,\ "qty": "1.0",\ "side": "B",\ "price": "43000.00",\ "fee": "43000.00",\ "type": "ORDER_MATCH",\ "timestamp": 1747927089946,\ "sequenceNumber": 1747927089946,\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ], "meta": { "limit": 1747927089946, "count": 1747927089946, "endTime": 1747927089946, "startTime": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" }, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy GET /v2/market/{symbol}/depth HTTP/1.1 Host: api.reya.xyz Accept: */* Copy { "symbol": "BTCRUSDPERP", "type": "SNAPSHOT", "bids": [\ {\ "px": "43000.00",\ "qty": "1.0",\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ], "asks": [\ {\ "px": "43000.00",\ "qty": "1.0",\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ], "updatedAt": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy GET /v2/market/{symbol}/spotExecutions HTTP/1.1 Host: api.reya.xyz Accept: */* Copy { "data": [\ {\ "exchangeId": 1747927089946,\ "symbol": "BTCRUSDPERP",\ "accountId": 1747927089946,\ "makerAccountId": 1747927089946,\ "orderId": "63552420354981888",\ "makerOrderId": "63552420037263360",\ "side": "B",\ "qty": "1.0",\ "price": "43000.00",\ "fee": "43000.00",\ "type": "ORDER_MATCH",\ "timestamp": 1747927089946,\ "ANY_ADDITIONAL_PROPERTY": "anything"\ }\ ], "meta": { "limit": 1747927089946, "count": 1747927089946, "endTime": 1747927089946, "startTime": 1747927089946, "ANY_ADDITIONAL_PROPERTY": "anything" }, "ANY_ADDITIONAL_PROPERTY": "anything" } Copy GET /v2/candleHistory/{symbol}/{resolution} HTTP/1.1 Host: api.reya.xyz Accept: */* Copy { "t": [\ 1747804140,\ 1747804200,\ 1747804260\ ], "o": [\ "2557.997",\ "2555.386",\ "2560.118"\ ], "h": [\ "2558.000",\ "2560.699",\ "2560.729"\ ], "l": [\ "2554.637",\ "2553.436",\ "2559.368"\ ], "c": [\ "2555.387",\ "2560.118",\ "2560.439"\ ], "ANY_ADDITIONAL_PROPERTY": "anything" } --- # Websocket API Reference | Developers | Reya [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#table-of-contents) Table of Contents ------------------------------------------------------------------------------------------------------------ 1. [Overview](https://docs.reya.xyz/developers/websocket-api-reference#overview) 2. [Server Endpoints](https://docs.reya.xyz/developers/websocket-api-reference#server-endpoints) 3. [Channel Architecture](https://docs.reya.xyz/developers/websocket-api-reference#channel-architecture) 4. [Message Structure](https://docs.reya.xyz/developers/websocket-api-reference#message-structure) 5. [Channels Reference](https://docs.reya.xyz/developers/websocket-api-reference#channels-reference) 6. [Data Types & Schemas](https://docs.reya.xyz/developers/websocket-api-reference#data-types--schemas) 7. [Connection Management](https://docs.reya.xyz/developers/websocket-api-reference#connection-management) [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#overview) Overview ------------------------------------------------------------------------------------------ The Reya DEX Trading WebSocket API v2 provides real-time streaming data for decentralized exchange operations on the Reya Network. This version offers user-friendly data structures with human-readable formats, removing blockchain-specific details while maintaining comprehensive trading functionality. [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#server-endpoints) Server Endpoints ---------------------------------------------------------------------------------------------------------- ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#production-environment) Production Environment * **URL**: `wss://ws.reya.xyz` * **Protocol**: WSS * **Description**: Production WebSocket server for live trading ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#staging-environment) Staging Environment * **URL**: `wss://websocket-staging.reya.xyz` * **Protocol**: WSS * **Description**: Staging WebSocket server for pre-production testing ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#test-environment) Test Environment * **URL**: `wss://websocket-testnet.reya.xyz` * **Protocol**: WSS * **Description**: Test WebSocket server for development [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#channel-architecture) Channel Architecture ------------------------------------------------------------------------------------------------------------------ The API uses a hierarchical channel structure with clear separation between different data types: ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#channel-categories) Channel Categories 1. **Market Data Channels** * `/v2/markets/summary` - Perp market summaries * `/v2/market/{symbol}/summary` - Individual perp market summary * `/v2/market/{symbol}/perpExecutions` - Market-specific perpetual executions * `/v2/market/{symbol}/depth` - L2 order book depth snapshots, only relevant for markets using the Reya Order Book instead of the AMM * `/v2/market/{symbol}/spotExecutions` - Market-specific spot executions * `/v2/prices` - All symbol prices * `/v2/prices/{symbol}` - Individual symbol prices 2. **Wallet Data Channels** * `/v2/wallet/{address}/positions` - Position updates * `/v2/wallet/{address}/orderChanges` - Order change updates * `/v2/wallet/{address}/perpExecutions` - Wallet-specific perpetual executions * `/v2/wallet/{address}/spotExecutions` - Wallet-specific spot executions * `/v2/wallet/{address}/accountBalances` - Account balance updates ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#parameter-validation) Parameter Validation #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#symbol-parameter) Symbol Parameter * **Pattern**: `^[A-Za-z0-9]+$` * **Examples**: `BTCRUSDPERP`, `ETHRUSD`, `kBONKRUSDPERP`, `AI16ZRUSDPERP` * **Description**: Trading symbol supporting alphanumeric characters #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#address-parameter) Address Parameter * **Pattern**: `^0x[a-fA-F0-9]{40}$` * **Example**: `0x6c51275fd01d5dbd2da194e92f920f8598306df2` * **Description**: Ethereum wallet address (40 hexadecimal characters) [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#message-structure) Message Structure ------------------------------------------------------------------------------------------------------------ All WebSocket messages follow a standardized envelope structure: ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#base-message-envelope) Base Message Envelope ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#message-components) Message Components * **type**: Always `"channel_data"` for data updates * **timestamp**: Server timestamp in milliseconds * **channel**: Specific channel identifier * **data**: Channel-specific payload (object or array) ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#heartbeat-messages) Heartbeat Messages #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#ping-message-server-client) Ping Message (Server → Client) #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#pong-message-client-server) Pong Message (Client → Server) [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#channels-reference) Channels Reference -------------------------------------------------------------------------------------------------------------- ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#id-1.-market-data-channels) 1\. Market Data Channels #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-markets-summary) `/v2/markets/summary` **Purpose**: Real-time updates for all market summaries **Subscription**: **Message Structure**: chevron-right**Data Type - MarketSummary**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-marketsummary) * `symbol` (string): Trading symbol * `updatedAt` (integer): Last calculation timestamp (milliseconds) * `longOiQty` (string): Long open interest in lots * `shortOiQty` (string): Short open interest in lots * `oiQty` (string): Total open interest quantity * `fundingRate` (string): Current hourly funding rate * `longFundingValue` (string): Current long funding value * `shortFundingValue` (string): Current short funding value * `fundingRateVelocity` (string): Funding rate velocity * `volume24h` (string): 24-hour trading volume * `pxChange24h` (string, optional): 24-hour price change * `throttledOraclePrice` (string, optional): Last oracle price at summary update * `throttledPoolPrice` (string, optional): Last pool price at summary update * `pricesUpdatedAt` (integer, optional): Last price update timestamp #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-market-symbol-summary) `/v2/market/{symbol}/summary` **Purpose**: Real-time updates for a specific market's summary **Parameters**: * `symbol`: Trading symbol (e.g., `BTCRUSDPERP`, `kBONKRUSDPERP`) **Subscription**: **Message Structure**: chevron-right**Data Type - MarketSummary**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-marketsummary-1) Same as above - see `/v2/markets/summary` channel for complete field definitions. #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-market-symbol-perpexecutions) `/v2/market/{symbol}/perpExecutions` **Purpose**: Real-time perpetual executions for a specific market **Parameters**: * `symbol`: Trading symbol (e.g., `BTCRUSDPERP`, `AI16ZRUSDPERP`) **Subscription**: **Message Structure**: chevron-right**Data Type - PerpExecution**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-perpexecution) * `exchangeId` (integer): Exchange identifier * `symbol` (string): Trading symbol * `accountId` (integer): Account identifier * `qty` (string): Execution quantity * `side` (Side): Execution side (B=Buy, A=Sell) * `fee` (string): Execution fee * `price` (string): Execution price * `type` (ExecutionType): Execution type (ORDER\_MATCH, LIQUIDATION, ADL) * `timestamp` (integer): Execution timestamp (milliseconds) * `sequenceNumber` (integer): Global sequence number #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-prices) `/v2/prices` **Purpose**: Real-time price updates for all symbols **Subscription**: **Message Structure**: chevron-right**Data Type - Price**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-price) * `symbol` (string): Trading symbol * `oraclePrice` (string): Oracle price - Price given by the Stork feeds, used both as the peg price for prices on Reya, as well as Mark Prices * `poolPrice` (string, optional): Pool price - The price currently quoted by the AMM for zero volume * `updatedAt` (integer): Last update timestamp (milliseconds) #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-prices-symbol) `/v2/prices/{symbol}` **Purpose**: Real-time price updates for a specific symbol **Parameters**: * `symbol`: Trading symbol (e.g., `BTCRUSDPERP`, `kBONKRUSDPERP`) **Subscription**: **Message Structure**: chevron-right**Data Type - Price**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-price-1) Same as above - see `/v2/prices` channel for complete field definitions. #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-market-symbol-depth) `/v2/market/{symbol}/depth` **Purpose**: Real-time L2 order book depth snapshots for a specific market **Parameters**: * `symbol`: Trading symbol (e.g., `BTCRUSDPERP`, `DOGERUSDPERP`) **Subscription**: **Message Structure**: chevron-right**Data Type - Depth**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-depth) * `symbol` (string): Trading symbol * `type` (DepthType): Depth message type (SNAPSHOT, UPDATE) * `bids` (array): Bid side levels aggregated by price, sorted descending by price * `px` (string): Price level * `qty` (string): Aggregated quantity at this price level * `asks` (array): Ask side levels aggregated by price, sorted ascending by price * `px` (string): Price level * `qty` (string): Aggregated quantity at this price level * `updatedAt` (integer): Snapshot generation timestamp (milliseconds) #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-market-symbol-spotexecutions) `/v2/market/{symbol}/spotExecutions` **Purpose**: Real-time spot executions for a specific market **Parameters**: * `symbol`: Trading symbol (e.g., `ETHRUSD`, `BTCRUSD`) **Subscription**: **Message Structure**: chevron-right**Data Type - SpotExecution**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-spotexecution) * `exchangeId` (integer, optional): Exchange identifier * `symbol` (string): Trading symbol * `accountId` (integer): Account identifier (taker) * `makerAccountId` (integer): Maker account ID (counterparty) * `orderId` (string, optional): Order ID for the taker * `makerOrderId` (string, optional): Order ID for the maker * `qty` (string): Execution quantity * `side` (Side): Execution side (B=Buy, A=Sell) * `price` (string): Execution price * `fee` (string): Execution fee * `type` (ExecutionType): Execution type (ORDER\_MATCH, LIQUIDATION, ADL) * `timestamp` (integer): Execution timestamp (milliseconds) * * * ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#id-2.-wallet-data-channels) 2\. Wallet Data Channels #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-wallet-address-positions) `/v2/wallet/{address}/positions` **Purpose**: Real-time position updates for a wallet **Parameters**: * `address`: Ethereum wallet address (e.g., `0x6c51275fd01d5dbd2da194e92f920f8598306df2`) **Subscription**: **Message Structure**: chevron-right**Data Type - Position**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-position) * `exchangeId` (integer): Exchange identifier * `symbol` (string): Trading symbol * `accountId` (integer): Account identifier * `qty` (string): Position quantity * `side` (Side): Position side (B=Buy, A=Sell) * `avgEntryPrice` (string): Average entry price * `avgEntryFundingValue` (string): Average entry funding value * `lastTradeSequenceNumber` (integer): Last execution sequence number #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-wallet-address-orderchanges) `/v2/wallet/{address}/orderChanges` **Purpose**: Real-time order change updates for wallet **Parameters**: * `address`: Ethereum wallet address **Subscription**: **Message Structure**: chevron-right**Data Type - Order**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-order) * `exchangeId` (integer): Exchange identifier * `symbol` (string): Trading symbol * `accountId` (integer): Account identifier * `side` (Side): Order side (B=Buy, A=Sell) * `limitPx` (string): Limit price * `orderType` (OrderType): Order type (LIMIT, TP, SL) * `status` (OrderStatus): Order status (OPEN, FILLED, CANCELLED, REJECTED) * `createdAt` (integer): Creation timestamp (milliseconds) * `lastUpdateAt` (integer): Last update timestamp (milliseconds) * `orderId` (string): Order identifier * `qty` (string, optional): Order quantity * `execQty` (string, optional): Executed quantity in the current order update * `cumQty` (string, optional): Total executed quantity across all fills * `triggerPx` (string, optional): Trigger price for TP/SL orders * `timeInForce` (TimeInForce, optional): Time in force (IOC, GTC) * `reduceOnly` (boolean, optional): Reduce-only flag (exclusively for LIMIT IOC orders) #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-wallet-address-perpexecutions) `/v2/wallet/{address}/perpExecutions` **Purpose**: Real-time perpetual execution updates for a wallet **Parameters**: * `address`: Ethereum wallet address **Subscription**: **Message Structure**: chevron-right**Data Type - PerpExecution**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-perpexecution-1) Same as above - see `/v2/market/{symbol}/perpExecutions` channel for complete field definitions. #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-wallet-address-spotexecutions) `/v2/wallet/{address}/spotExecutions` **Purpose**: Real-time spot execution updates for a wallet **Parameters**: * `address`: Ethereum wallet address **Subscription**: **Message Structure**: chevron-right**Data Type - SpotExecution**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-spotexecution-1) Same as above - see `/v2/market/{symbol}/spotExecutions` channel for complete field definitions. #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#v2-wallet-address-accountbalances) `/v2/wallet/{address}/accountBalances` **Purpose**: Real-time account balance updates for a wallet **Parameters**: * `address`: Ethereum wallet address **Subscription**: **Message Structure**: chevron-right**Data Type - AccountBalance**[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-type-accountbalance) * `accountId` (integer): Account identifier * `asset` (string): Asset symbol (e.g., WSTETH, RUSD) * `realBalance` (string): Sum of account net deposits and realized PnL from closed positions * `balance_DEPRECATED` (string): Sum of account net deposits only (deprecated, will be removed) [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#data-types-and-schemas) Data Types & Schemas -------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#enumeration-types) Enumeration Types chevron-right**Side** - Order/position side indicator[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#side-order-position-side-indicator) * `B`: Buy/Bid * `A`: Ask/Sell chevron-right**ExecutionType** - Type of execution that occurred[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#executiontype-type-of-execution-that-occurred) * `ORDER_MATCH`: Regular order matching * `LIQUIDATION`: Liquidation execution * `ADL`: Auto-deleveraging execution chevron-right**OrderStatus** - Current status of an order[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#orderstatus-current-status-of-an-order) * `OPEN`: Order is active and can be filled * `FILLED`: Order has been completely filled * `CANCELLED`: Order has been cancelled * `REJECTED`: Order was rejected chevron-right**OrderType** - Type of order placed[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#ordertype-type-of-order-placed) * `LIMIT`: Limit order * `TP`: Take profit order * `SL`: Stop loss order chevron-right**TimeInForce** - Order duration specification[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#timeinforce-order-duration-specification) * `IOC`: Immediate or Cancel * `GTC`: Good Till Cancel chevron-right**DepthType** - Order book depth message type[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#depthtype-order-book-depth-message-type) * `SNAPSHOT`: Full order book snapshot * `UPDATE`: Single level change update chevron-right**AccountType** - Account type classification[hashtag](https://docs.reya.xyz/developers/websocket-api-reference#accounttype-account-type-classification) * `MAINPERP`: Main perpetual trading account * `SUBPERP`: Sub perpetual trading account * `SPOT`: Spot trading only account [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#connection-management) Connection Management -------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#heartbeat-management) Heartbeat Management The API implements a ping/pong heartbeat mechanism: 1. **Server Ping**: Server sends periodic ping messages 2. **Client Pong**: Client must respond with pong messages 3. **Connection Health**: Failure to respond may result in disconnection ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#connection-best-practices) Connection Best Practices 1. **Implement Reconnection Logic**: Handle connection drops gracefully 2. **Manage Subscriptions**: Track active subscriptions for reconnection 3. **Handle Backpressure**: Process messages efficiently to avoid buffer overflow 4. **Monitor Latency**: Track message timestamps for performance monitoring 5. **Validate Messages**: Verify message structure and required fields ### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#control-messages) Control Messages #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#subscribe-message-client-server) Subscribe Message (Client → Server) #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#subscribed-confirmation-server-client) Subscribed Confirmation (Server → Client) #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#unsubscribe-message-client-server) Unsubscribe Message (Client → Server) #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#unsubscribed-confirmation-server-client) Unsubscribed Confirmation (Server → Client) #### [hashtag](https://docs.reya.xyz/developers/websocket-api-reference#error-message-server-client) Error Message (Server → Client) [PreviousSignatures and Nonceschevron-left](https://docs.reya.xyz/developers/rest-api-reference/signatures-and-nonces) [NextSmart Contract Withdrawalschevron-right](https://docs.reya.xyz/developers/smart-contract-withdrawals) * [Table of Contents](https://docs.reya.xyz/developers/websocket-api-reference#table-of-contents) * [Overview](https://docs.reya.xyz/developers/websocket-api-reference#overview) * [Server Endpoints](https://docs.reya.xyz/developers/websocket-api-reference#server-endpoints) * [Production Environment](https://docs.reya.xyz/developers/websocket-api-reference#production-environment) * [Staging Environment](https://docs.reya.xyz/developers/websocket-api-reference#staging-environment) * [Test Environment](https://docs.reya.xyz/developers/websocket-api-reference#test-environment) * [Channel Architecture](https://docs.reya.xyz/developers/websocket-api-reference#channel-architecture) * [Channel Categories](https://docs.reya.xyz/developers/websocket-api-reference#channel-categories) * [Parameter Validation](https://docs.reya.xyz/developers/websocket-api-reference#parameter-validation) * [Message Structure](https://docs.reya.xyz/developers/websocket-api-reference#message-structure) * [Base Message Envelope](https://docs.reya.xyz/developers/websocket-api-reference#base-message-envelope) * [Message Components](https://docs.reya.xyz/developers/websocket-api-reference#message-components) * [Heartbeat Messages](https://docs.reya.xyz/developers/websocket-api-reference#heartbeat-messages) * [Channels Reference](https://docs.reya.xyz/developers/websocket-api-reference#channels-reference) * [1\. Market Data Channels](https://docs.reya.xyz/developers/websocket-api-reference#id-1.-market-data-channels) * [2\. Wallet Data Channels](https://docs.reya.xyz/developers/websocket-api-reference#id-2.-wallet-data-channels) * [Data Types & Schemas](https://docs.reya.xyz/developers/websocket-api-reference#data-types-and-schemas) * [Enumeration Types](https://docs.reya.xyz/developers/websocket-api-reference#enumeration-types) * [Connection Management](https://docs.reya.xyz/developers/websocket-api-reference#connection-management) * [Heartbeat Management](https://docs.reya.xyz/developers/websocket-api-reference#heartbeat-management) * [Connection Best Practices](https://docs.reya.xyz/developers/websocket-api-reference#connection-best-practices) * [Control Messages](https://docs.reya.xyz/developers/websocket-api-reference#control-messages) Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/market/BTCRUSDPERP/summary", "data": { /* channel-specific data */ } } Copy { "type": "ping", "timestamp": 1747927089946 } Copy { "type": "pong", "timestamp": 1747927089946 } Copy { "type": "subscribe", "channel": "/v2/markets/summary" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/markets/summary", "data": [\ {\ "symbol": "BTCRUSDPERP",\ "updatedAt": 1747927089946,\ "longOiQty": "154.741",\ "shortOiQty": "154.706",\ "oiQty": "154.741",\ "fundingRate": "-0.000509373441021089",\ "longFundingValue": "412142.26",\ "shortFundingValue": "412142.26",\ "fundingRateVelocity": "-0.00000006243",\ "volume24h": "917833.49891",\ "pxChange24h": "92.6272285500004",\ "throttledOraclePrice": "2666.48162040777",\ "throttledPoolPrice": "2666.48166680625",\ "pricesUpdatedAt": 1747927089597\ }\ ] } Copy { "type": "subscribe", "channel": "/v2/market/BTCRUSDPERP/summary" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/market/BTCRUSDPERP/summary", "data": { "symbol": "BTCRUSDPERP", "updatedAt": 1747927089946, "longOiQty": "154.741", "shortOiQty": "154.706", "oiQty": "154.741", "fundingRate": "-0.000509373441021089", "longFundingValue": "412142.26", "shortFundingValue": "412142.26", "fundingRateVelocity": "-0.00000006243", "volume24h": "917833.49891", "pxChange24h": "92.6272285500004", "throttledOraclePrice": "2666.48162040777", "throttledPoolPrice": "2666.48166680625", "pricesUpdatedAt": 1747927089597 } } Copy { "type": "subscribe", "channel": "/v2/market/BTCRUSDPERP/perpExecutions" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/market/BTCRUSDPERP/perpExecutions", "data": [\ {\ "exchangeId": 1,\ "symbol": "BTCRUSDPERP",\ "accountId": 12345,\ "qty": "1.0",\ "side": "B",\ "price": "43000.00",\ "fee": "0.50",\ "type": "ORDER_MATCH",\ "timestamp": 1747927089946,\ "sequenceNumber": 152954\ }\ ] } Copy { "type": "subscribe", "channel": "/v2/prices" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/prices", "data": [\ {\ "symbol": "BTCRUSDPERP",\ "oraclePrice": "43000.00",\ "poolPrice": "42999.50",\ "updatedAt": 1747927089946\ },\ {\ "symbol": "ETHRUSDPERP",\ "oraclePrice": "2500.00",\ "poolPrice": "2499.75",\ "updatedAt": 1747927089946\ }\ ] } Copy { "type": "subscribe", "channel": "/v2/prices/BTCRUSDPERP" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/prices/BTCRUSDPERP", "data": { "symbol": "BTCRUSDPERP", "oraclePrice": "43000.00", "poolPrice": "42999.50", "updatedAt": 1747927089946 } } Copy { "type": "subscribe", "channel": "/v2/market/BTCRUSDPERP/depth" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/market/BTCRUSDPERP/depth", "data": { "symbol": "BTCRUSDPERP", "type": "SNAPSHOT", "bids": [\ { "px": "42999.50", "qty": "1.5" },\ { "px": "42998.00", "qty": "2.0" }\ ], "asks": [\ { "px": "43000.50", "qty": "1.0" },\ { "px": "43001.00", "qty": "3.0" }\ ], "updatedAt": 1747927089946 } } Copy { "type": "subscribe", "channel": "/v2/market/ETHRUSD/spotExecutions" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/market/ETHRUSD/spotExecutions", "data": [\ {\ "exchangeId": 1,\ "symbol": "ETHRUSD",\ "accountId": 12345,\ "makerAccountId": 67890,\ "orderId": "63552420354981888",\ "makerOrderId": "63552420037263360",\ "qty": "1.0",\ "side": "B",\ "price": "2500.00",\ "fee": "0.0",\ "type": "ORDER_MATCH",\ "timestamp": 1747927089946\ }\ ] } Copy { "type": "subscribe", "channel": "/v2/wallet/0x6c51275fd01d5dbd2da194e92f920f8598306df2/positions" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/wallet/0x6c51275fd01d5dbd2da194e92f920f8598306df2/positions", "data": [\ {\ "exchangeId": 1,\ "symbol": "BTCRUSDPERP",\ "accountId": 12345,\ "qty": "1.5",\ "side": "B",\ "avgEntryPrice": "43000.00",\ "avgEntryFundingValue": "100.25",\ "lastTradeSequenceNumber": 152954\ }\ ] } Copy { "type": "subscribe", "channel": "/v2/wallet/0x6c51275fd01d5dbd2da194e92f920f8598306df2/orderChanges" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/wallet/0x6c51275fd01d5dbd2da194e92f920f8598306df2/orderChanges", "data": [\ {\ "exchangeId": 1,\ "symbol": "BTCRUSDPERP",\ "accountId": 12345,\ "orderId": "123456789-123123123",\ "qty": "1.0",\ "execQty": "0.5",\ "side": "B",\ "limitPx": "43000.00",\ "orderType": "LIMIT",\ "triggerPx": "50000.0",\ "timeInForce": "GTC",\ "reduceOnly": false,\ "status": "OPEN",\ "createdAt": 1747927089946,\ "lastUpdateAt": 1747927089946\ }\ ] } Copy { "type": "subscribe", "channel": "/v2/wallet/0x6c51275fd01d5dbd2da194e92f920f8598306df2/perpExecutions" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/wallet/0x6c51275fd01d5dbd2da194e92f920f8598306df2/perpExecutions", "data": [\ {\ "exchangeId": 1,\ "symbol": "BTCRUSDPERP",\ "accountId": 12345,\ "qty": "1.0",\ "side": "B",\ "price": "43000.00",\ "fee": "0.50",\ "type": "ORDER_MATCH",\ "timestamp": 1747927089946,\ "sequenceNumber": 152954\ }\ ] } Copy { "type": "subscribe", "channel": "/v2/wallet/0x6c51275fd01d5dbd2da194e92f920f8598306df2/spotExecutions" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/wallet/0x6c51275fd01d5dbd2da194e92f920f8598306df2/spotExecutions", "data": [\ {\ "exchangeId": 1,\ "symbol": "ETHRUSD",\ "accountId": 12345,\ "makerAccountId": 67890,\ "orderId": "63552420354981888",\ "makerOrderId": "63552420037263360",\ "qty": "1.0",\ "side": "B",\ "price": "2500.00",\ "fee": "0.0",\ "type": "ORDER_MATCH",\ "timestamp": 1747927089946\ }\ ] } Copy { "type": "subscribe", "channel": "/v2/wallet/0x6c51275fd01d5dbd2da194e92f920f8598306df2/accountBalances" } Copy { "type": "channel_data", "timestamp": 1747927089946, "channel": "/v2/wallet/0x6c51275fd01d5dbd2da194e92f920f8598306df2/accountBalances", "data": [\ {\ "accountId": 12345,\ "asset": "WSTETH",\ "realBalance": "1.25",\ "balance_DEPRECATED": "1.25"\ }\ ] } Copy { "type": "subscribe", "channel": "/v2/markets/summary", "id": "req123" } Copy { "type": "subscribed", "channel": "/v2/markets/summary", "contents": { /* optional initial data */ } } Copy { "type": "unsubscribe", "channel": "/v2/markets/summary", "id": "req123" } Copy { "type": "unsubscribed", "channel": "/v2/markets/summary" } Copy { "type": "error", "message": "Invalid channel", "channel": "/v2/invalid/channel" } --- # Reya DEX REST API v2 | Reya **Base URL**: `https://api.reya.xyz/v2` [hashtag](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2#overview) Overview ------------------------------------------------------------------------------------------- The Reya DEX REST API v2 provides programmatic access to the Reya Perpetual Exchange, enabling traders to interact with the platform algorithmically. This API is designed for developers and professional traders who want to build automated trading systems, integrate with existing platforms, or develop custom interfaces for the Reya DEX ecosystem. [hashtag](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2#key-features) Key Features --------------------------------------------------------------------------------------------------- * **Market Data**: Access comprehensive market information, including asset definitions, market summaries, and real-time price data * **Order Management**: Create, cancel, and monitor orders with support for various order types (limit, trigger) * **Position Tracking**: Monitor your current positions and historical executions * **Wallet Integration**: Manage wallet configurations and access wallet-specific data * **Price Data**: Access historical price data with customizable time intervals through candle endpoints [hashtag](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2#api-structure) API Structure ----------------------------------------------------------------------------------------------------- The API is organized into several logical sections: * **Reference Data**: Discover markets and assets definitions, trading fees * **Market Data**: Access real-time and historical market data, including prices, candles and order execution * **Wallet Data**: Get information about the wallet's accounts, positions and orders * **Order Entry**: Create and cancel orders [hashtag](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2#signatures) Signatures ----------------------------------------------------------------------------------------------- For private endpoints that access user-specific data or perform actions on behalf of a user, authentication is required through wallet signatures. This ensures that only authorized users can create and update orders. [hashtag](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2#rate-limits) Rate Limits ------------------------------------------------------------------------------------------------- To ensure fair usage and optimal performance, the API implements rate limiting. For more information, see the [Rate Limits](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2/rate-limits) documentation. For real-time data needs, consider using our WebSocket API for streaming updates. Last updated 4 months ago * [Overview](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2#overview) * [Key Features](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2#key-features) * [API Structure](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2#api-structure) * [Signatures](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2#signatures) * [Rate Limits](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2#rate-limits) --- # Auto-exchange and Liquidations | Reya [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#position-liquidations) Position liquidations --------------------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#my-position-was-liquidated.-why-is-that) My position was liquidated. Why is that? Positions are liquidated when they are _undercollateralized_. What this means is that your margin balance went below the minimum level (the _liquidation margin requirement_, LMR) that the margin system considered safe for the exposure you were holding with that position. In other words, too little money to cover for the potential losses you could suffer. ### [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#how-can-i-avoid-being-liquidated) How can I avoid being liquidated? For your convenience, the trading app shows the _margin ratio_ of your different positions/accounts. The margin ratio is the ratio of your LMR over your margin balance: ![](https://docs.reya.xyz/~gitbook/image?url=https%3A%2F%2F3892139141-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGymvVw95ZlIikLljgnKB%252Fuploads%252FHxPUdH1jkmXd6prFdvMc%252Fimage.png%3Falt%3Dmedia%26token%3D5fc2bbbb-39e7-42b9-8791-a0a25cb8b656&width=768&dpr=4&quality=100&sign=543494f0&sv=2) * If this ratio is below 100%, it means your margin balance is bigger than your LMR, so you are not subject to liquidations. * However, the margin ratio is constantly changing due market movements, meaning that values under but close to 100% put your account in danger and you should either reduce/close your position voluntarily, or top up your account. * Once the margin ratio goes over 100%, you account can be liquidated. ### [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#what-exactly-is-a-liquidation-anyway) What exactly _is_ a liquidation, anyway? A liquidation is a forceful closure of positions to reduce or entirely stop the losses your account is accumulating, before your account becomes insolvent. This exposure, however, doesn’t just vanish — there are traders on the opposite side who expect the ‘mirror PnL’ of your position. This means the exposure needs to be transferred to someone else, who receives the position at a discount. This entire operation is handled by a special component called the _Liquidation Module_. ### [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#in-addition-to-the-losses-from-closing-my-position-i-also-see-money-was-sent-in-transfers.-what-are) In addition to the losses from closing my position, I also see money was sent in transfers. What are they for and where do they go? Whenever an account is liquidated, in addition to having your position closed with a penalty, you will be charged _liquidations fees_. These liquidations fees are proportional to the risk that was removed from your account, and they go to two essential elements of the system: the **insurance fund**, which is a rainy day fund used (and only used) to cover insolvencies; and the **passive pool**, which works as a backstop to all liquidations whenever conditions require it. ### [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#so-basically-liquidations-just-close-my-trades-at-bad-prices-and-then-charge-me-for-it) So, basically, liquidations just close my trades at bad prices, and then charge me for it. Not quite. In fact, in almost all instances, liquidations are only _partial._ The liquidation module will try to close as little exposure as possible, at the least discount possible. Essentially, it tries to bring your LMR down, but just enough to get your margin balance back just below 100%. It accomplishes this by closing only one portion of exposure at a time. This explains why you might see a series of liquidations in your transaction history: each one closed part of your exposure to bring your account back over water, until markets moved in your favor again, or you are left with no exposure. ### [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#actually-i-can-see-one-big-liquidation-at-a-price-that-is-worse-than-any-on-the-candle-graph.-and-my) Actually, I can see one big liquidation at a price that is worse than any on the candle graph. And my account has no money in it. What’s up with that? This means your account was liquidated through the ‘**backstop flow**’. Remember how we said that the passive pool acts as a backstop to liquidations? This happens when the partial liquidations fail to keep your account healthy, or the markets move very quickly against you. Due to the increased urgency in getting your account liquidated, your _entire_ position is pushed directly onto the passive pool, which also takes the _entirety_ of your margin balance as compensation. The backstop flow is the last resort measure to prevent the **collateral pool** from going insolvent, guaranteeing it can make good on any profits that traders make. The backstop threshold is the margin ratio at which the backstop flow is enabled, and currently set at 125%. ### [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#does-this-mean-the-passive-pool-is-making-up-my-losses) Does this mean the passive pool is making up my losses? No. The pool only absorbs positions at a profit, that is, at a price that is favorable. This is why the backstop threshold exists: it’s a level at which the pool can still use the remaining margin balance to create a positions without immediately losing money on it. So, if you are an LP, rest assured you are not making up any losses from traders. In particular, the passive pool will stop taking on positions as soon as an account’s funds aren’t enough to at least cover the liquidation fees. And remember, the pool gets 50% of fees of _every_ liquidation, not just backstop. ### [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#but-then-how-does-the-collateral-pool-stay-solvent-if-my-account-goes-insolvent) But then how does the collateral pool stay solvent if my account goes insolvent? Depending on the circumstances, two things can happen (even both at the same time): * There is an **insurance fund** which is a rainy day fund that is used (_and can only be used_) to make up any insolvencies resulting after a liquidation. Remember those liquidation fees? That’s what they’re used for. * In the extreme circumstance that an account were to end up with such a large insolvency that the insurance fund could not cover it, the backstop flow would then activate _auto-deleveraging._\*\* Essentially, as a last resort, the liquidation module will distribute the exposure of the liquidated account proportionally to every trader on the opposing side, partially closing _their_ position. This last layer of the backstop flow has never been activated, and we hope that is never needed. But it ensures that the collateral pool **always** has enough funds to cover its obligations to traders. And importantly, accomplishes this in the fairest way possible: as unpleasant as it is to have your position closed when you are profiting, _everyone_ gets hit proportionally in the same way. This way, no one can ‘front run’ anyone else on the way out; and no human intervention can tip the scales in anyone’s favor. Oh! And by the way, _Reya’s the only one DEX that can do this._ Reya is bringing performance _and confidence_ to DeFi. ### [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#what-about-cross-margined-accounts) What about cross-margined accounts? Cross-margined accounts are dealt in a holistic way. This means that all positions are liquidated in the same proportion, therefore preserving any hedges that you might have in place. In other words, we take your risk management seriously. ### [hashtag](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#but-wouldnt-it-be-better-to-just-liquidate-the-losing-positions) But wouldn’t it be better to just liquidate the losing positions? Well… no. If you assume the market is moving directionally (e.g., tanking), then cutting off the losing positions makes sense. But what if the market bounces? Then, the previously profitable positions (which would have been left open) will start losing money when the market reverses, and the liquidated positions won’t be there to profit off the bounce. The important thing is that we respect any risk mitigations you put in place, including hedges. Ultimately, you should make active risk management an integral part of your trading. Stay safe out there! Last updated 11 months ago * [Position liquidations](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#position-liquidations) * [My position was liquidated. Why is that?](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#my-position-was-liquidated.-why-is-that) * [How can I avoid being liquidated?](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#how-can-i-avoid-being-liquidated) * [What exactly is a liquidation, anyway?](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#what-exactly-is-a-liquidation-anyway) * [In addition to the losses from closing my position, I also see money was sent in transfers. What are they for and where do they go?](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#in-addition-to-the-losses-from-closing-my-position-i-also-see-money-was-sent-in-transfers.-what-are) * [So, basically, liquidations just close my trades at bad prices, and then charge me for it.](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#so-basically-liquidations-just-close-my-trades-at-bad-prices-and-then-charge-me-for-it) * [Actually, I can see one big liquidation at a price that is worse than any on the candle graph. And my account has no money in it. What’s up with that?](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#actually-i-can-see-one-big-liquidation-at-a-price-that-is-worse-than-any-on-the-candle-graph.-and-my) * [Does this mean the passive pool is making up my losses?](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#does-this-mean-the-passive-pool-is-making-up-my-losses) * [But then how does the collateral pool stay solvent if my account goes insolvent?](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#but-then-how-does-the-collateral-pool-stay-solvent-if-my-account-goes-insolvent) * [What about cross-margined accounts?](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#what-about-cross-margined-accounts) * [But wouldn’t it be better to just liquidate the losing positions?](https://docs.reya.xyz/trading/reya-dex/auto-exchange-and-liquidations#but-wouldnt-it-be-better-to-just-liquidate-the-losing-positions) --- # Rate Limits | Reya To ensure fair usage and maintain optimal performance for all users, the Reya API implements rate limiting. The enforced rate limits are the following: * **1,000 requests** per 60-second window per IP address/API key * Rate limit counters reset at the end of each 60-second window ### [hashtag](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2/rate-limits#important-notes) Important Notes * You can consume your entire quota at any point within the window (for example, all 1,000 requests in the first second) * Once the limit is reached, additional requests will be rejected with a `429 Too Many Requests` status code until the current window expires * Rate limits apply across all API endpoints collectively, not per endpoint For most real-time data needs, we recommend using our WebSocket API instead of polling the REST API. If your application requires higher rate limits, please contact the Reya team. The team will review your request and determine if higher limits can be granted based on your specific needs and usage patterns. Last updated 4 months ago --- # Reya DEX | Reya ReyaDEX is the flagship trading platform built on Reya Network, designed to deliver the future of on-chain trading with unmatched liquidity, performance, and capital efficiency. ### [hashtag](https://docs.reya.xyz/trading/reya-dex#superior-liquidity) Superior Liquidity * **Shared Network Liquidity**: All markets share the same pool, ensuring maximum liquidity availability * **CEX Price Pegging**: Uses Stork's ultra-fast price feeds from major CEXs (Binance, OKX, ByBIT) for optimal pricing * **Unrivalled Market Depth**: Lowest price impacts and smoothly distributed liquidity along a continuous curve * **Reliable Execution**: Trading against the pool ensures consistent liquidity even during extreme volatility ### [hashtag](https://docs.reya.xyz/trading/reya-dex#exceptional-performance) Exceptional Performance * **High-Speed Infrastructure**: 100ms block times with 99.9% uptime * **Ultra-Fresh Pricing**: Stork's 10ms data feed updates ensure the most accurate pricing on-chain * **MEV & Front-Running Protection**: Architecture designed to eliminate front-running and minimize MEV * **Advanced Programmatic Access**: High-quality REST API and websocket connections for sophisticated trading strategies ### [hashtag](https://docs.reya.xyz/trading/reya-dex#maximized-capital-efficiency) Maximized Capital Efficiency * **Unified Margin Account**: Trade both perpetuals and spot from the same margin account * **Cross-Collateralization**: Use multiple asset types as collateral, including yield-bearing assets * **Flash Swaps**: Swap collateral assets with deferred margin checks * **Portfolio Cross-Margining**: Optimize capital by recognizing your portfolio holistically across DEXs * **Intelligent Liquidations**: Secure, automated, and designed to protect trader positions ### [hashtag](https://docs.reya.xyz/trading/reya-dex#get-started) Get Started Ready to experience superior on-chain trading? [Trade on ReyaDEX nowarrow-up-right](https://app.reya.xyz/) Last updated 10 months ago * [Superior Liquidity](https://docs.reya.xyz/trading/reya-dex#superior-liquidity) * [Exceptional Performance](https://docs.reya.xyz/trading/reya-dex#exceptional-performance) * [Maximized Capital Efficiency](https://docs.reya.xyz/trading/reya-dex#maximized-capital-efficiency) * [Get Started](https://docs.reya.xyz/trading/reya-dex#get-started) ---