{"repo":"akshay-rakheja/arbitrage-alpaca","free":true,"listed":false,"github":"https://github.com/akshay-rakheja/arbitrage-alpaca","clone":"git clone https://github.com/akshay-rakheja/arbitrage-alpaca.git","description":"DEX-CEX Arbitrage","language":"Python","stars":163,"topics":["alpaca","alpaca-trading-api","arbitrage","arbitrage-bot","arbitrage-trading","bitcoin","cryptocurrency","ethereum","exchange","polygon"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"What is a DEX? A Decentralized exchange or a DEX is a peer-to-peer marketplace that facilitates transactions in a permission-less manner. DEX's use \"Automated Market Maker\" protocols that orchestrate trade without the need for a centralized body. What is a DEX Aggregator? A DEX Aggregator (eg: 1Inch) aims to provide the best prices for swaps across multiple liquidity sources (eg: Uniswap, Sushiswap, etc). Using a DEX aggregator like 1Inch helps us avoid relying on a single source for price data. This is important since 1 liquidity source alone might not be able to route the entire transaction without experiencing significant slippage. What is a CEX? A Centralized exchange or CEX is operated in a centralized manner by a company. Orders on a CEX are maintained in an order book where buyers and sellers place their bids and a trade executes when the bids match. What are we building? We are building an arbitrage bot that trades when the price of an asset is different on a Centralized exchange compared to that on a Decentralized exchange by a given percentage. You can find the source code of the bot here. This will involve: 1. Receiving quotes from a CEX and DEX asynchronously every 5 seconds 2. Checking if those prices meet the arbitrage condition 3. Executing trades if the condition is met 4. Rebalancing position on both sides if needed We will be using Alpaca's Crypto API's to get quotes and execute trades on Centralized exchanges such as FTXUS and Coinbase. On the other hand, 1","default_branch":null,"files":null,"tree":[],"storefront":"/r/akshay-rakheja","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/akshay-rakheja/arbitrage-alpaca/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}