Staked
Search…
RAY API
Use our RAY API for convenient access to the RAY smart contracts.

Getting Started

You'll need an API Key to get started.

RAY Interactions

For each of the endpoints in this section, you will submit a POST request and receive a transaction object in return. Sign the transaction object and submit it to Ethereum to complete the desired action.
Transaction Object Schema
Field
Description
Type
from
Address signing the transaction
String
to
Target contract address
String
gas
Estimated upper-bound of gas consumption
Number
gasPrice
Estimated gas price in GWei
String (HEX formatted)
value
Ether to send with transaction in Wei
String (HEX formatted)
post
https://ray.staked.cloud/api/v1
/account/:address/allowance
Grant ERC-20 Allowance
post
https://ray.staked.cloud/api/v1
/account/:address/purchase
Mint a RAY Token
RAY does not support all possible combinations of opportunities with rebalancing calls and oracle monitoring. Selecting opportunities associated with the RAY V2 tokens is recommended.
RAY Token
Underlying Deposit Token
Portfolio Opportunities
RAY ETH
ETH
["compound", "dydx", "aave", "bzx"]
RAY DAI
DAI
["compound", "dydx", "aave", "dsr", "bzx"]
RAY USDC
USDC
["compound", "dydx", "aave", "bzx"]
bzx is disabled
put
https://ray.staked.cloud/api/v1
/account/:address/token/:tokenID/withdraw
Redeem Funds

RAY Portfolios

Each RAY token is associated with a portfolio. These portfolios define the opportunities between which a RAY token rebalances between.
RAY Token
Portfolio Identifier
RAY ETH
0xda7bfa5022265a9af7a95bf987e0ab3676a73bf83db817cd7c7793569054fff4
RAY DAI
0xf718ab6dc6da441acdc78107a8d317bc03e73837f54f725bd6f6ddd204ddd170
RAY USDC
0xaf145a0288e9599b7c20a388e502db1bec31609e0e8e125a89be848ce2858fa2
get
https://ray.staked.cloud/api/v1
/portfolio/:portfolioID
Get Portfolio Details
get
https://ray.staked.cloud/api/v1
/portfolio/:portfolioID/allocation
Get Portfolio Allocation

RAY Reporting

RAY Reporting methods detail the holdings of an Ethereum address. Each response contains high-level information along with the RAY tokens owned by the address.

RAY Token (v2) Object Schema

Field
Description
Type
uuid
RAY token contract address
String
capital
Deposit amount (in decimals of underlying token)
Number
type
Portfolio identifier of the RAY token
String
principal
Deposit token name
String
purchaseTime
Unix timestamp of deposit
Number
valueFlow
Array of objects that describe interactions with the RAY token
Array
interestEarnt
Total amount of interest earned by depositor
String
tokenValue
Amount of underlying redeemable by depositor
String
get
https://ray.staked.cloud/api/v1
/account/:address
Get Tokens Associated with Address
get
https://ray.staked.cloud/api/v1
/account/:address/token/:tokenID
Get Details of a Specific RAY Token
Last modified 1yr ago