Jackrabbit Relay is an API endpoint for stock, forex and cryptocurrency exchanges that accept REST webhooks.

Overview

JackrabbitRelay

Jackrabbit Relay is an API endpoint for stock, forex and cryptocurrency exchanges that accept REST webhooks.

Disclaimer

Please note RAPMD Crypto, LLC ("the Company"), does not provide financial advice. The Company, and any associated companies, owners, employees, agents or volunteers, do not hold themselves out as Commodity Trading Advisors (“CTAs”) or Authorized Financial Advisors (“AFAs”). The owners, publishers, employees and agents are not licensed under securities laws to address particular investment situations. No information presented constitutes a recommendation to buy, sell or hold any security, financial product or instrument discussed therein or to engage in any specific investment strategy.

All content is for informational purposes only. The content provided herein is not intended to replace or serve as a substitute for any legal, tax, investment or other professional advice, consultation or service. It is important to do your own analysis before making any investment based on your own financial circumstances, investment objectives, risk tolerance and liquidity needs.

All investments are speculative in nature and involve substantial risk of loss. The Company does not in any way warrant or guarantee the success of any action you take in reliance on the statements, recommendations or materials. The Company, owners, publishers, employees and agents are not liable for any losses or damages, monetary or other that may result from the application of information contained within any statements, recommendations or materials. Individuals must use their own due diligence in analyzing featured trading indicators, other trading tools, webinars and other educational materials to determine if they represent suitable and useable features and capabilities for the individual.

Use this Software at your own risk. It is provided AS IS. The Company accepts no responsibility or liability for losses incurred through using this software. While The Company has gone to great lengths to test the software, if you do find any bugs, please report them to us in the Jackrabbit Support Server or on Github, and we will sort them out. Remember that risk management is your responsibility. If you lose your account, that's entirely on you.

Past performance is not indicative of future results. Investments involve substantial risk. Any past results provided are intended as examples only and are in no way a reflection of what an individual could have made or lost in the same situation.

Notes

Currently, Jackrabbit Relay supports ONLY spot markets. Work is being done to supprt futures and margins. Some exchanges may work already, but I don't know which ones as many I can't test personally.

Video

Yes, there's a video. Please watch it, then come back here and read everything. Rinse and repeat as many times as needed :)

Installing Jackrabbit Relay

Confirmed working exchanges

FTX
FTX US
Kraken

Theorically supported

This is a theorical list. The exchange name listed below is what MUST be used in your alwert message to interact with a given exchangge. Some exchange may NOT work, but I have no way of testing them.

aax            aofex          ascendex           bequant
bibox          bigone         binance            binancecoinm 
binanceus      binanceusdm    bit2c              bitbank
bitbay         bitbns         bitcoincom         bitfinex
bitfinex2      bitflyer       bitforex           bitget
bithumb        bitmart        bitmex             bitpanda 
bitso          bitstamp       bitstamp1          bittrex
bitvavo        bitz           bl3p               braziliex 
btcalpha       btcbox         btcmarkets         btctradeua 
btcturk        buda           bw                 bybit 
cdax           cex            coinbase           coinbaseprime 
coinbasepro    coincheck      coinegg            coinex
coinfalcon     coinfloor      coinmarketcap      coinmate 
coinone        coinspot       crex24             currencycom 
delta          deribit        digifinex          eqonex
equos          exmo           exx                flowbtc 
ftx            ftxus          gateio             gemini 
hbtc           hitbtc         hollaex            huobi 
huobijp        huobipro       idex               independentreserve 
indodax        itbit          kraken             kucoin
kuna           latoken        lbank              liquid 
luno           lykke          mercado            mixcoins 
ndax           novadax        oceanex            okcoin 
okex           okex3          okex5              paymium 
phemex         poloniex       probit             qtrade 
ripio          stex           therock            tidebit 
tidex          timex          upbit              vcc 
wavesexchange  whitebit       xena               yobit 
zaif           zb

Requirements

This software requires a VPS with one core, one gig of RAM, 2 gigs of swap, 40 gigs of SSD storage. This software was developed for the intention of using a VPS to its fullest extent. If you wish to use a virtual environment, please consult your VPS documentation.

Jackrabbit Relay requires Python 3 and pip3. If you do not have pip3, the below link will show you how to install it.

https://www.linuxscrew.com/install-pip

The command for installation really is very simple and here is the short version. please be sure you are in route or in your virtual environment appropriate to the documentation of your VPS. the below command is for Ubuntu.you will need to use the package manager appropriate to your VPS.

apt install python3-pip

Security and firewall

Whitelisting IP addresses and setting up restrictions is solely to the the responsibility of your native firewall. There is absolutely no way I can provide any level of security that is even remotely comparable to the firewall your VPS already comes with. Suggesting such is a severe misnomer to you and the security of your VPS. Please consult the documentation of your VPS for establishing your firewall rules.

Installation

Please be aware that you may need to switch to your root account. Please follow the neccessary instructions provided by your VPS provider. This document assumes you are already at root level or have your virtual environment established, both are beyound the scope of this documentatiom.

Start with these shell commands

mkdir -p /home/GitHub
cd /home/GitHub
git clone https://github.com/rapmd73/JackrabbitRelay

You now have a copy of the Jackrabbit repository. Now its time to install everything.

cd /home/GitHub/JackrabbitRelay
./install

At this point the files are inatalled, but more setup is required before Relay is ready to run. Configuring the exchanges and crontab need to be completed next.

Configuration

The Jackrabbit Relay file structure and folder layout is very simple:

/home/JackrabbitRelay/

    This is the main folder

/home/JackrabbitRelay/Config

    This is where all configuration files are stored

/home/JackrabbitRelay/Base

    All program files go here

/home/JackrabbitRelay/Logs

    All log files go here

In the base directory (/home/JackrabbitRelay/Base), there are several files:

CCXT-PlaceOrder

    This is the Order Processor. You actually wont use this file
    directly, but rather copy it to the actual exchange designated
    order transactor, for example PlaceOrder.ftxus

PlaceOrder.tester

    This is just a dummy test module that you can use to test the
    connection with TradingView. It too, gets copied to the exchange
    designator, for example, PlaceOrder.kraken

JackrabbitRelay

    This is the actual server program that waits for a connewction.
    It should NOT be ran directly, but rather through the
    RelayLauncher shell script.

RelayLauncher

    This shell script sets the port and launches the server. It is
    the harness that keeps everything running and is what you place
    in your CronTab.

The Jackrabbit Relay files are ver sime JSON based text. Here is an example:

{ "Account":"MAIN","API":"YourAPI","SECRET":"YourSecret","RateLimit":"200" }

This would be placed in a folder called /home/JackrabbitRelay/Config and named something like ftxus.cfg

This file would be the configuration for the FTX.US exchange.

Now for the details:

Account: this MUST be MAIN, case sensitive, for the main account of
every exchange.

API: your API key exactly as your exchange gives it to you.

SECRET: your SECRET exactly as your exchange gives it to you.

RateLimit: This is the amount Relay waits between each exchange API
call.

    ALL EXCHANGES HAVE RATE LIMIT REQUIREMENTS.

    This value represent milliseconds. 1000 is one second. If you
    leave this out, chances are you will be banned from your
    exchange, most likely temporarily. You will have to tweak this
    number based upon your exchange.

Jackrabbit support multiple API per exchange (sub)account. This is accomplished by this format:

{ "Account":"MAIN","API 1":"YourAPI","SECRET 1":"YourSecret","RateLimit":"200" }
{ "Account":"MAIN","API 2":"YourAPI","SECRET 2":"YourSecret","RateLimit":"200" }

The above means the your MAIN account has two API/SECRET combinations the Relay will rotate between. Each (sub)account can hace as many as your exchange will allow.

Reboot startup

For Jackrabbit Relay to auto start after a reboot, the following line neesa to be added to your crontab. BE SURE TO CHANGE THE 12345 TO THE PORT YOU WANT.

@reboot ( /home/JackrabbitRelay/Base/RelayLauncher 12345 & ) > /dev/null 2>&1

Manual startup

Use the following command. Be sure to replace the 12345 with the proper port.

( /home/JackrabbitRelay/Base/RelayLauncher 12345 & ) > /dev/null 2>&1

The Payload

Here are examples of the payload sent from TradingView of similar webhook based application.

This example purchased $30 of AAVE on the FTX US exchange.

{ "Exchange":"ftxus","Market":"Spot","Account":"MAIN","Action":"Buy","Asset":"AAVE/USD","USD":"30" }

This example purchases the minimum amount of AAVE in USD

{ "Exchange":"ftxus","Market":"Spot","Account":"MAIN","Action":"Buy","Asset":"AAVE/USD" }

This example sells $7 of AAVE

{ "Exchange":"ftxus","Market":"Spot","Account":"MAIN","Action":"Sell","Asset":"AAVE/USD","USD":"7" }

This example sells th exchange minimum of AAVE

{ "Exchange":"ftxus","Market":"Spot","Account":"MAIN","Action":"Sell","Asset":"AAVE/USD" }

This example close out or sells all of AAVE

{ "Exchange":"ftxus","Market":"Spot","Account":"MAIN","Action":"Close","Asset":"AAVE/USD" }

This example purchases AAVE using its base value, in this case, 1 AAVE

{ "Exchange":"kraken","Market":"Spot","Account":"MAIN","Action":"Buy","Asset":"AAVE/USD","Base":"1" }

Discriptionn of the payload

Exchange

    This is one of the supported exchanges.

Market

    This is the market you are trading. 

    Spot            Working 
    Prepetuals      Maybe working FTX ONLY
    Margin          In progress
    Future          In progress

Account

    All main accounts must be called MAIN. Subaccounts can be used
    and must be exactly as listed on the exchange.

Action

    Buy             Make a purchase
    Sell            Sell a portion. If amount is more then balance, position will be closed
    Close           Sell all of the asset

Asset

    The asset you are trading. Must be exactly as the exchange lists it

USD/Base

    Choose only one to set the amount to be purchased/sold

    USD will only work if the asset has a coresponsing USD pair to do
    a proper base conversion on.

    Base is the asset itself value, ie BTC, ADA, AAVE, so one.
        A base of 1 for BTC is to purchase 1 BTC.

Logging

Below are examples of the log files.

This is the Jackrabbit Relay server log file:

2021-09-22 22:34:53.059783 62.151.179.169   ('POST / HTTP/1.1', '200', '-')

Here is an example of the Place Order log for the FTX US exchange:

2021-09-22 22:34:53.277575 1009381 Processing order
2021-09-22 22:34:53.277851 1009381 Order Parsed
2021-09-22 22:34:53.277908 1009381 |- Exchange: ftxus
2021-09-22 22:34:53.277943 1009381 |- Target Market: Spot
2021-09-22 22:34:53.277974 1009381 |- Account reference: MAIN
2021-09-22 22:34:53.278003 1009381 |- Trade Action: close
2021-09-22 22:34:53.278032 1009381 |- Asset: SUSHI/USD
2021-09-22 22:34:53.278060 1009381 |- Using minimum position size
2021-09-22 22:34:53.278166 1009381 API/Secret loaded for ftxus, (sub)account: MAIN
2021-09-22 22:34:53.282798 1009381 |- Rate limit set to 200 ms
2021-09-22 22:34:53.519999 1009381 Markets loaded
2021-09-22 22:34:53.520204 1009381 Base currency:  SUSHI
2021-09-22 22:34:53.520250 1009381 Quote currency: USD
2021-09-22 22:34:53.773082 1009381 Getting market: SUSHI/USD
2021-09-22 22:34:53.773290 1009381 |- Minimum: 0.5
2021-09-22 22:34:53.773339 1009381 |- Amount: 0.5
2021-09-22 22:34:54.000871 1009381 Previous Balance: 3.500000 SUSHI
2021-09-22 22:34:54.001063 1009381 |- Forcing balance
2021-09-22 22:34:54.001123 1009381 Placing Order
2021-09-22 22:34:54.001157 1009381 |- Pair: SUSHI/USD
2021-09-22 22:34:54.001187 1009381 |- Action: close
2021-09-22 22:34:54.001219 1009381 |- Amount: 3.5
2021-09-22 22:34:54.001250 1009381 |- Close: 10.4774
2021-09-22 22:34:54.001291 1009381 |- Price: 36.6709
2021-09-22 22:34:54.280677 1009381 |- ID: 1547473833
2021-09-22 22:34:54.398102 1009381 New Balance: 0.000000 SUSHI
2021-09-22 22:34:54.398277 1009381 Processing Completed: 01.120702 seconds
Comments
  • POST Request from curl not working

    POST Request from curl not working

    I'm trying to sent a post request from curl / Siri Shortcuts. It is not working, I also tried postman and always get no response or timeout. In the Logs of JRR I see completly nothing.

    I'm trying the following:

    curl -H 'Content-Type: application/json' -d '{"Exchange":"ftx","Market":"Spot","Account":"MAIN","Action":"Buy","Asset":"ETH/USD:USD","Base":"0.01"}' -H "Content-Type: application/json; charset=utf-8" -X POST http://3.4.4.5:80

    If I switch to GET, I get directly a feedback from the JRR Server with "NO!"

    If I'm using the same Payload: {"Exchange":"ftx","Market":"Spot","Account":"MAIN","Action":"Buy","Asset":"ETH/USD:USD","Base":"0.01"}

    and the IP http://3.4.4.5:80

    in an Tradingview alert it is perfectly working.

    What is wrong with my command, hopefully you can help me, thanks in advance!

    Timo

    opened by TimoD87 2
  • Being able to use Tradingview strategies with JRR

    Being able to use Tradingview strategies with JRR

    I would like to request the feature that JRR can reviece signals from TV when using strategies. The TV strategy may send in it's webhook payload: "Exchange":"ftx","Market":"Future","Account":"003sniperatrmacdma","Action":"{{strategy.order.action}}","Asset":"BTC/USD:USD","Base":"{{strategy.order.contracts}}" }

    {{strategy.order.action}} = buy or sell {{strategy.order.contracts}} = amount to buys or sell as Base value ( 0.00001 BC)

    The strategy itself will long/short; stop loss; multi take profit etc. and the strategy properties (Initial capital; Base currency; Order size settings) will be used internaly for these calculations.

    All what JRR will recieve in the final payload is buy/sell from the {{strategy.order.action}} and correct order amount as base value from {{strategy.order.contracts}} (Settings on TV strategy in USD will result in the correct signal for base amount automatically right now)

    I "think" what would be the final request is:

    • Please let JRR long and short with the buy/sell signal from TV strategies (at this time sell can not short)
    • Please let JRR understand base values from TV strategies (at this time base will only make a minimum order ( 1 Lot))

    I use FTX PERPS with it. Testaccount can be provided Best regards, Me4tgrinder

    opened by Me4tGrind3r 2
  • Update Error

    Update Error

    I tryed to fetch update but I have received this error:

    [email protected]:/home/JackrabbitRelay# git pull https://github.com/rapmd73/JackrabbitRelay
    
    remote: Enumerating objects: 449, done.
    remote: Counting objects: 100% (449/449), done.
    remote: Compressing objects: 100% (262/262), done.
    remote: Total 422 (delta 328), reused 251 (delta 159), pack-reused 0
    Receiving objects: 100% (422/422), 79.29 KiB | 8.81 MiB/s, done.
    Resolving deltas: 100% (328/328), completed with 21 local objects.
    From https://github.com/rapmd73/JackrabbitRelay
       5110cda..d3d3f77  main       -> origin/main
    Updating 5110cda..d3d3f77
    error: Your local changes to the following files would be overwritten by merge:
            Base/CCXT-PlaceOrder.future
            Base/CCXT-PlaceOrder.spot
            Base/Library/JRRapi.py
            Base/Library/JRRconfig.py
            Base/Library/JRRlog.py
            Base/Library/JRRsupport.py
    Please commit your changes or stash them before you merge.
    Aborting
    
    opened by riodda 2
  • Relative position sizing (Feature Request)

    Relative position sizing (Feature Request)

    Would be nice to be able to open positions relative to account size. for FTX that would be the 'availableWithoutBorrow' and Binance that would be 'availableBalance' i would say.

    Resultant position size calculated: Absolute Size: If size=500, then the resultant position size will be $500 Factored Sizing: If size=2x, then the resultant position size will be calculated at double the current account balance.

    With the option for a maximum size, some exchanges have a max order-size for specific leverage level and for managing your own risk-appitate.

    Example: FTX futures account has $5000 total collateral. Factored Sizing 20x, No Maximum size Results in 20 x 5000 = $100.000

    FTX futures account has $5000 total collateral. Factored Sizing 20x, Maximum size = $50.000 Results in 20 x 5000 = $100.000 -> maximum size triggerd -> $50.000

    opened by aghering23 1
  • updated JRRapi

    updated JRRapi

    Added funciton to fetch all candles between 2 given datetime Updated backtest accordingly Typo Line 86 missing " Line 10 should be from Base.Library.JRRapi import FetchCandles_interval

    opened by riodda 1
  • [BUG] margin trading

    [BUG] margin trading

    All margin trading is a hot mess at the moment. Do not try it as it will fail.

    Spot and futures work fine.

    I do have limited success on Binance long positions, but not enough to consider it as a viable blueprint moving forward.

    I am working on possible workarounds and solutions to get this fixed, including building my own framework structure specifically for the problem. It will take time though.

    Thank you.

    bug 
    opened by rapmd73 1
  • Ignore first Buy (feature request)

    Ignore first Buy (feature request)

    Would be nice to have the bot that in case of no open position on a certain pair will ignore the first buy request, for low number of accumulation strategies it will lower the average price.

    Feature Request 
    opened by riodda 3
Releases(V2.Alpha.0.0.0.1.0)
  • V2.Alpha.0.0.0.1.0(Nov 23, 2022)

    This is the official ALPHA release of version 2, Jackrabbit Relay.

    Basic functions work as expected. Exchanges may or may not work as expected based upon their own characteristics and legal jurisdictions. A list of working exchanges is available.

    Source code(tar.gz)
    Source code(zip)
Owner
Rose Heart
Author and developer of Jackrabbit and maintainer of FrostyBot.
Rose Heart
Sample code helps get you started with a simple Python web service using AWS Lambda and Amazon API Gateway

Welcome to the AWS CodeStar sample web service This sample code helps get you started with a simple Python web service using AWS Lambda and Amazon API

0 Jan 20, 2022
A Discord bot that may save your day by predicting it.

Sage A Discord bot that may save your day by predicting it.

1 Nov 17, 2022
Python API for British Geological Survey magnetic field calculator

Magnetic field calculator Python API for British Geological Survey magnetic field calculator. Description This project magnetic field calculator. It u

Filip Š 3 Mar 11, 2022
𝐀 𝐔𝐥𝐭𝐢𝐦𝐚𝐭𝐞 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐁𝐨𝐭 𝐅𝐨𝐫 𝐅𝐨𝐫𝐜𝐢𝐧𝐠 𝐘𝐨𝐮𝐫 𝐆𝐫𝐨𝐮𝐩 𝐌𝐞𝐦𝐛𝐞𝐫𝐬 𝐓𝐨 𝐒𝐮𝐛𝐬𝐜𝐫𝐢𝐛𝐞 𝐘𝐨𝐮𝐫 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐂𝐡𝐚𝐧𝐧𝐞𝐥

𝐇𝐨𝐰 𝐓𝐨 𝐃𝐞𝐩𝐥𝐨𝐲 For easiest way to deploy this Bot click on the below button 𝐌𝐚𝐝𝐞 𝐁𝐲 𝐒𝐮𝐩𝐩𝐨𝐫𝐭 𝐆𝐫𝐨𝐮𝐩 𝐒𝐨𝐮𝐫𝐜𝐞𝐬 𝐅𝐢𝐧𝐝

Mukesh Solanki 2 Jan 05, 2022
Easy to use API Wrapper for somerandomapi.ml.

Overview somerandomapi is an API Wrapper for some-random-api.ml Examples Asynchronous from somerandomapi import Animal import asyncio async def main

Myxi 1 Dec 31, 2021
a Disqus alternative

Isso – a commenting server similar to Disqus Isso – Ich schrei sonst – is a lightweight commenting server written in Python and JavaScript. It aims to

Martin Zimmermann 4.7k Jan 02, 2023
1.本项目采用Python Flask框架开发提供(应用管理,实例管理,Ansible管理,LDAP管理等相关功能)

op-devops-api 1.本项目采用Python Flask框架开发提供(应用管理,实例管理,Ansible管理,LDAP管理等相关功能) 后端项目配套前端项目为:op-devops-ui jenkinsManager 一.插件python-jenkins bug修复 (1).插件版本 pyt

3 Nov 12, 2021
Telegram bot for stream music or video on telegram

KYURA MUSIC Telegram bot for stream music or video on telegram, powered by PyTgCalls and Pyrogram Help Need Help me to translate this repo, click the

0 Dec 08, 2022
An automated bot for twitter using Tweepy!

Tweeby An automated bot for twitter using Tweepy! About This bot will look for tweets that contain certain hashtags, if found. It'll send them a messa

Ori 1 Dec 06, 2021
A Telegram bot to extracting text from images. All languages supported.

OCR Bot A Telegram bot to extracting text from images. All languages supported. Deploy to Heroku Local Deploying Clone the repo git clone https://gith

6 Oct 21, 2022
A Discord API Wrapper for Userbots/Selfbots written in Python.

DisCum A simple, easy to use, non-restrictive, synchronous Discord API Wrapper for Selfbots/Userbots written in Python. -using requests and websockets

Liam 450 Dec 27, 2022
Python Client Library to interface with the Phoenix Realtime Server

supabase-realtime-client Python Client Library to interface with the Phoenix Realtime Server This is a fork of the supabase community realtime client

Anand 2 May 24, 2022
A collective list of free APIs for use in software and web development.

Public APIs A collective list of free APIs for use in software and web development. A public API for this project can be found here! For information o

222.5k Jan 02, 2023
Temperature Monitoring and Prediction Using a Modified Lambda Architecture

Temperature Monitoring and Prediction Using a Modified Lambda Architecture A more detailed write up can be seen in this paper. Original Lambda Archite

Parsa Yousefi 2 Jun 27, 2022
Python library for Spurwing API to schedule appointments, manage calendars and custom integrations.

Spurwing API Python Library Lightweight Python library for Spurwing's API. Spurwing's API makes it easy to add robust scheduling and booking to your a

Spurwing 1 Jul 14, 2021
Hasan Can Kaya - Konusanlar Ticket Notifier

Hasan Can Kaya - Konusanlar Ticket Notifier This script sends a notification to any telegram chat/group/channel when added a new available ticket to b

omer citak 3 Jan 31, 2022
A Bot To remove forwarded messages

Forward-Mess-Remover A Bot To remove forwarded messages. uses Remove forwarded messages from Group. Deploy To Heroku

SpamShield 5 Oct 14, 2022
Template to create a telegram bot in python

Template for Telegram Bot Template to create a telegram bot in python. How to Run Set your telegram bot token as environment variable TELEGRAM_BOT_TOK

Ali Hejazizo 12 Aug 14, 2022
Cogs for RedDiscord-Bot V3

Cogs v3 Disclaimer: This is an unapproved repo, meaning no one has formally reviewed this repo yet and any loss of data in your bot isn't my fault (An

Honkertonken 5 Nov 17, 2022
A pdisk uploader bot written in Python

Pdisk Uploader Bot 🔥 Upload on Pdisk by Url, File and also by direct forward post from other channel... Features Post to Post Conversion Url Upload D

Paritosh Kumar 33 Oct 21, 2022