Need to create the hedge service
338 USDA service that watches the list of your btc addresses and exchange balances and fully hedges it with derivatives (futures or perpetuals)
1. Checks everything once in x minutes in v0.1 (later event-based).
2. Monitors the BTC addresses transactions to know the wallets balance, by polling some free
blockchain data provider REST API, or a provided full node.
3. Monitors the exchange balance (including unrealised PnL) by polling REST API (bitmex get
/user/wallet)
4. Monitors the futures/swap position by polling REST API (bitmex get /execution/tradeHistory)
to get all trade executions with a "hedge" comment and calculating the hedge position to
distinguish it from other possible trading at this account.
5. Gets the current BTC price (bitmex get /instrument for swap, futures and index).
6. If abs(btc balance - hedge position - desired BTC exposure) > tolerance, send a market order
and wait for reply to make it equal (with a comment that it is a hedge).
7. Saves the balances on exchange and private wallets, in BTC, USD current prices, USD futures
prices; hedge in USD(=contracts) and BTC(equivalent) to the database.
Technical requirements:
- Use AWS Amplify or smth similar to simplify the web part development as much as possible.
- Keep the api keys secured!
- Deploy web backend and hedge service on separate machines.
- Store api keys in a separate database that is only accessible from the hedge service server.
- Hedge service has all incoming ports closed.
- AND/OR do whatever you think is necessary.
- Deliver as a Github project with CI for build, tests, docker image publishing, deployment
- Hedge service deploys in a docker container.
- Separate deployment for web and hedge service with a few clicks.
- Expected load is minimal.
- Logging and writing logs somewhere.
- Use the simplest technologies possible. Hedging service in Python or NodeJS. Web part in whatever is considered good choice today.
- This is a prototype, no need to write perfect code and write extensive tests at this stage, but be reasonable, it should work.
- Only 1 exchange for now (Bitmex).
- I'll explain how to calculate the order size in contracts for hedging x BTC.
Please provide your own quotes, the current price is a placeholder.
Current freelance projects in the category Cryptocurrency & Blockchain
Development of a Telegram store (Mini App) with anonymous payment acceptance (Apple/Google Pay ➔ Crypto on Tr
110 USD
I'm looking for an experienced developer to create an online store in Telegram for the European market. The main and most challenging task of the project is to implement the payment logic. It is necessary to build a bridge between classic fiat and crypto (Fiat-to-Crypto… Cryptocurrency & Blockchain, Bot Development ∙ 13 days 9 hours back ∙ 37 proposals |