This SDK provides tools to simplify interaction with the Infinite Trading API and to streamline the development of trading strategies using R.
- Easy authentication with your Infinite Trading API key
- Helpers for strategy development in R
- Simple environment setup
-
Install R (and optionally RStudio)
-
Clone this repository to your local machine:
git clone https://github.com/InfiniteTradingProtocol/Infinite-Trading-R-SDK-v1.git
- Go to infinitetrading.io/managers
- Connect your wallet and sign the message
- Generate your Gas Wallet β this will provide your API key
-
Open the file
main.R- Add the directory containing this repository
- Use
/instead of\for file paths
-
Open the
.envfile and add your API key:API_KEY="your_api_key_here"
Once installed and configured, you can begin writing trading strategies directly in R using the Infinite Trading API. For example:
# Replace this with your current directory or just source("main.R") if you set on R-Studio the working directory as the repository folder.
source("C:/Users/YourUser/Documents/GitHub/Infinite-Trading-R-SDK-V1/main.R")
- There is a pre-made ETH-USD 6H EMA Crossover Strategy that you can modify and use to trade using our API.
Strategies/WETH-USDC.R). - API requests require your wallet to be funded for transactions (Requires ETH on Optimism/Base/Arbitrum/Ethereum and POL on Polygon).
- Ensure your
.envfile is not shared or committed to version control (add it to.gitignore). - API requests require your wallet to be connected and funded for gas transactions.