GET /df/binance/1min/{SYMBOL}.{RETURN_TYPE}Returns:
last 24 hours of klinesExamples:
GET /df/binance/1min/BTCUSDT.csvReturns
date,open,high,low,close,volume,close_time,quote_asset_volume,number_of_trades,taker_buy_base_asset_volume,taker_buy_base_a_volume,ignore 1596765600000,0.71555,0.9899899999999999,0.71555,0.97,548.2,1596765659999,533.2931480000001,5,548.2,533.2931480000001,0 1596765660000,0.97,0.97,0.7324,0.73241,3588.7,1596765719999,2794.48396824,17,18.4,17.848,0 1596765720000,0.73245,0.87552506,0.73245,0.87552506,1862.5,1596765779999,1365.97656325,12,12.5,10.94406325,0 1596765780000,0.73245,0.73245,0.73242,0.73242,6061.4,1596765839999,4439.60603842,16,142.6,104.44309342,0 1596765840000,0.73242001,0.73242001,0.73242001,0.73242001,272.0,1596765899999,199.21824269,4,272.0,199.21824269,0 1596765900000,0.73242001,0.73242001,0.7324,0.73242,475.98866856,1596765959999,348.61883511,12,37.1,27.17278237,0 1596765960000,0.73242,0.73242,0.73,0.73,7567.81133144,1596766019999,5524.90669916,15,0.0,0.0,0 1596766020000,0.7215477,0.7324,0.7215477,0.7324,1164.47499789,1596766079999,847.92369192,9,513.0900272,370.84933942,0 1596766080000,0.7324,0.7324,0.7155600000000001,0.72155,1295.49938966,1596766139999,938.47319608,13,480.99599176,347.33942012,0 1596766140000,0.72155,0.72155,0.72155,0.72155,0.0,1596766199999,0.0,0,0.0,0.0,0 1596766200000,0.72154999,0.72154999,0.72154999,0.72154999,297.4,1596766259999,214.58896702,2,292.5,211.05337207,0 ...Request
GET /df/binance/1min/BTCUSDT.json?start=2019-01-01This would return an object of up to the minute kline since January 1st, 2019.
GET /df/binance/1min/BTCUSDT.json?start=2019-01-01&stop=2020-03-2020This would return a json object of BTCUSDT of every minute kline from January 1st, 2019 to March 3rd, 2020.
# Monitoring buy, sell, oco orders binance. # Want to keep the bm.start_user_socket(process_message) up so don't timed out. from binance.client import Client # for connections binance from binance.websockets import BinanceSocketManager # for websocket binance from bin_api_keys import * # import api keys import time import sys client = Client(api_key=PUBLIC, api_secret=SECRET) # keys are in file bin_api_keys.py def countdown(t): # Countdown for next socket alive pings while t: mins, secs = divmod(t, 60) timeformat = '{:02d}:{:02d}'.format(mins, secs) # print(timeformat, end='\r') sys.stdout.write('\r' + timeformat + ' countdown ... ') time.sleep(1) t -= 1 def p_is_msg(pr_msg): # print is_msg to terminal. (later to write to a file). print(pr_msg) def f_timestamp(nr): # make date time nice timestamp = int(nr) / 1000 timestamp = datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S') return timestamp def process_message(msg): # run when binance user_socket sends user message if msg['e'] == 'listStatus': is_oco = True is_msg = f_timestamp(msg['T']) + ' ' + msg['s'] + ' ' + msg['c'] + ' ' + msg['l'] + ' ' + msg['L'] + ' ' + \ msg['r'] p_is_msg(is_msg) if msg['e'] == 'executionReport': base_exchanged = str(round(float(msg['p']) * float(msg['q']), 8)) is_msg = f_timestamp(msg['T']) + ' ' + msg['s'] + ' ' + msg['S'] + ' ' + msg['o'] + ' ' + msg[ 'x'] + ' quantity:' + msg['q'] + ' price:' + msg['p'] + ' stop:' + msg[ 'P'] + ' ' + 'Base:' + base_exchanged p_is_msg(is_msg) bm = BinanceSocketManager(client) conn_key = bm.start_user_socket(process_message) # start user sockets bm.start() # Start the socket manager # Dont time out the user socket with binance is_counter = 0 while True: if is_counter > 5: # Countdown x times and then send keepalive signal print('Send a keep alive signal But how?') bm._keepalive_account_socket # dont work # client.ping() # dont work is_counter = 0 countdown(3) # countdown x seconds 1800 = 30 minutes is_counter += 1 print(is_counter) # Stop sockets bm.stop_socket(conn_key) bm.close()
![]() | There are many interesting strategies on the square page (https://www.fmz.com/square) of the FMZ Quant platform. Back then, most of the cryptocurrency exchanges API interface were using the rest protocol, Many strategies are based on the rest interface, therefore, sometimes the market quotes update is slow. In addition, there have been some cases in which the exchange's rest interface has failed in the near future, resulting in a strategy that cannot preforming properly. submitted by FmzQuant to CryptoCurrencyTrading [link] [comments] As long as the strategy is modified, adding support for the websocket interface requires some changes to the strategy code, which is usually rather troublesome (the difficulty of changing the strategy is much higher than rewriting it). How can we not change the strategy code, but use the websocket market quote interface? Here is the full flexibility of the FMZ Quant platform, we can use: Use the strategy "template class library". Preforming a "Hook" operation for the exchange market quotes obtaining function such as exchange.GetTicker. Thus, without changing the strategy code, let the strategy using the data driven and pushed by the websocket market interface. The code writing language uses the JavaScript programming language. Analysis strategyFor example, when we need to modify a classic strategy "Icebreaker"Strategy address : https://www.fmz.com/strategy/9929 Let's take a look the strategy code and find that the strategy is driven by the tick market quote. It mainly uses the properties of Buy, Sell, and Last in the ticker data. The ticker data is obtained by the API function of the FMZ Quant platform: exchange.GetTicker. The goal is clear now, we can replace the exchange.GetTicker function with Hook operation (that is, replace it with another version). However, we can't rewrite it in the "icebreaker" strategy code, it will affect the strategy logic, we want the seamlessly docking to the websocket! So we need the next protagonist to debut. The "template class library" function and the "init" function work togetherWe create a "template class library" named: "SeamlessConnWS"Then set 2 parameters to the SeamlessConnWS template.
Once the template is created, we can write a specific access to the exchange's websocket interface in the template, subscribe to certain quotes, and then wait for the function code of the exchange to push the data. The specific code is not described here, you can refer to the SeamlessConnWS code (already open sourced) and the FMZ Quant official API documentation. One thing need to mentioned is that the init function in the template and the global variables _DictConnectCreater, _ConnMap: Code part: var _DictConnectCreater = { "Huobi" : WSConnecter_Huobi, "Binance" : WSConnecter_Binance, } var _ConnMap = {} function init () { if (IsUsedWebSocket) { var connectCreater = null if (exchanges.length != 1) { Log("Switching to the ws interface only for the "exchange" exchange object (ie, the first added exchange object)") } var isFound = false for (var name in _DictConnectCreater) { if (exchange.GetName() == name) { connectCreater = _DictConnectCreater[name] isFound = true } } if (!isFound) { throw "Did not find an implementation" } if (Hook_GetTicker) { var symbol = exchange.GetCurrency() _ConnMap.GetTicker = connectCreater("GetTicker", symbol) exchange.GetTicker = function () { return _C(_ConnMap.GetTicker.Read) } } // ... } }It can be seen that this template only implements the websocket market interface of two exchanges, which are the Binance and Huobi. The init function is to make sure that when the "Icebreaker" strategy call the SeamlessConnWS template, the init function will execute first during the real market running progress. we can replace the content of the exchange.GetTicker function with the code of using he websocket interface, thus achieving seamless docking to the websocket market. SeamlessConnWS template address: https://www.fmz.com/strategy/167755 How to use itA piece of cake! After copying the SeamlessConnWS template into your strategy library, you can just use the "Icebreaker" strategy to reference it, as shown in the figure: https://preview.redd.it/h9w4odjfkyo41.png?width=1920&format=png&auto=webp&s=5e3170f6d1a8f736163739cedb41c319043c65fd make sure to click check the template, and the save button. Create a "Icebreaker" strategy real-time robot, the exchange chooses the trading pair. https://preview.redd.it/wnff5hjhkyo41.png?width=182&format=png&auto=webp&s=29c33a20ee406b9a3691d5fc9cab0073baa20fb9 Open the control parameters on the SeamlessConnWS template. https://preview.redd.it/80vi4q9mkyo41.png?width=1130&format=png&auto=webp&s=a2061cbc2c2fe19e2a244e11cf793e0f47e2b341 Run it up: https://preview.redd.it/ca4cm3jokyo41.png?width=1709&format=png&auto=webp&s=a62515a8aa5399034fab7a206b8467a0f65499a5 In order to easily see the pushed data, on line 157, we specifically added a print log code, it will output the data pushed by the exchange. https://preview.redd.it/60krfk3rkyo41.png?width=1733&format=png&auto=webp&s=e204ff4e9f4ea0ebbdbea5c538765875dd9626d0 Display on the robot log: https://preview.redd.it/g77zqvbtkyo41.png?width=1711&format=png&auto=webp&s=2d80e6588d2bf9d69badbb296f6df2998d4c42d8 This way, we don't need modify any line of the strategy code, and achieves seamless docking with the websocket market interface. This example is only for the strategy of using the exchange.GetTicker market interface function, other market interfaces such as exchange.GetDepth, exchange.GetTrades and exchange.GetRecords are the same routine! For the standard template SeamlessConnWS, you can try to expand it further. For the implementation of the specific link websocket in the template, use the Dial function (see the API documentation about the Dial function), which can be adjusted as needed. For example, you can specify the parameter -2 to the read() function, which returns only the latest data in the buffer that the websocket connection accepts. Thanks for reading |
time curl -s --proxy http://X.X.X.X:8888 https://api.binance.com/api/v3/ping real 0m0.597s user 0m0.040s sys 0m0.008s`However, my attempts to connect to a websocket through the proxy have failed. Below is the code.
OkHttpClient client = new OkHttpClient.Builder() .proxy(new Proxy(Type.HTTP, new InetSocketAddress("103.4.12.88", 8888))) .build(); Request request = new Request.Builder() .url("wss://fstream.binance.com/stream") .build(); WebSocket webSocket = client.newWebSocket(request, new WebSocketListener() { @Override public void onFailure(final WebSocket webSocket, final Throwable t, final Response response) { System.out.println("Failed."); t.printStackTrace(); } });If I remove the line .proxy(new Proxy(Type.HTTP, new InetSocketAddress("X.X.X.X", 8888))), then it works perfectly well, but if I have that line, I get the exception:
java.io.IOException: Unexpected response code for CONNECT: 403 at okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.kt:447) at okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.kt:235) at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:170) at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:236) at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:109)I'm at a loss as to what to do? I can access the proxy through terminal but can't connect to a websocket through it.
![]() | submitted by bitmex_register to u/bitmex_register [link] [comments] https://preview.redd.it/fl5e0q7i3cc41.jpg?width=1024&format=pjpg&auto=webp&s=445485d722839a9adc1ae13db4c965b0ae3e67b7 Founded by HDR Global Trading Limited (which in turn was founded by former bankers Arthur Hayes, Samuel Reed and Ben Delo) in 2014, BitMEX is a trading platform operating around the world and registered in the Seychelles. Meaning Bitcoin Mercantile Exchange, BitMEX is one of the largest Bitcoin trading platforms currently operating, with a daily trading volume of over 35,000 BTC and over 540,000 accesses monthly and a trading history of over $34 billion worth of Bitcoin since its inception. https://preview.redd.it/coenpm4k3cc41.jpg?width=808&format=pjpg&auto=webp&s=8832dcafa5bd615b511bbeb6118ef43d73ed785e Unlike many other trading exchanges, BitMEX only accepts deposits through Bitcoin, which can then be used to purchase a variety of other cryptocurrencies. BitMEX specialises in sophisticated financial operations such as margin trading, which is trading with leverage. Like many of the exchanges that operate through cryptocurrencies, BitMEX is currently unregulated in any jurisdiction. Visit BitMEX How to Sign Up to BitMEXIn order to create an account on BitMEX, users first have to register with the website. Registration only requires an email address, the email address must be a genuine address as users will receive an email to confirm registration in order to verify the account. Once users are registered, there are no trading limits. Traders must be at least 18 years of age to sign up.https://preview.redd.it/0v13qoil3cc41.jpg?width=808&format=pjpg&auto=webp&s=e6134bc089c4e352dce10d754dc84ff11a4c7994 However, it should be noted that BitMEX does not accept any US-based traders and will use IP checks to verify that users are not in the US. While some US users have bypassed this with the use of a VPN, it is not recommended that US individuals sign up to the BitMEX service, especially given the fact that alternative exchanges are available to service US customers that function within the US legal framework. How to Use BitMEX BitMEX allows users to trade cryptocurrencies against a number of fiat currencies, namely the US Dollar, the Japanese Yen and the Chinese Yuan. BitMEX allows users to trade a number of different cryptocurrencies, namely Bitcoin, Bitcoin Cash, Dash, Ethereum, Ethereum Classic, Litecoin, Monero, Ripple, Tezos and Zcash. The trading platform on BitMEX is very intuitive and easy to use for those familiar with similar markets. However, it is not for the beginner. The interface does look a little dated when compared to newer exchanges like Binance and Kucoin’s. Once users have signed up to the platform, they should click on Trade, and all the trading instruments will be displayed beneath. Clicking on the particular instrument opens the orderbook, recent trades, and the order slip on the left. The order book shows three columns – the bid value for the underlying asset, the quantity of the order, and the total USD value of all orders, both short and long. The widgets on the trading platform can be changed according to the user’s viewing preferences, allowing users to have full control on what is displayed. It also has a built in feature that provides for TradingView charting. This offers a wide range of charting tool and is considered to be an improvement on many of the offering available from many of its competitors. https://preview.redd.it/fabg1nxo3cc41.jpg?width=808&format=pjpg&auto=webp&s=6d939889c3eac15ab1e78ec37a8ccd13fc5e0573 Once trades are made, all orders can be easily viewed in the trading platform interface. There are tabs where users can select their Active Orders, see the Stops that are in place, check the Orders Filled (total or partially) and the trade history. On the Active Orders and Stops tabs, traders can cancel any order, by clicking the “Cancel” button. Users also see all currently open positions, with an analysis if it is in the black or red. BitMEX uses a method called auto-deleveraging which BitMEX uses to ensure that liquidated positions are able to be closed even in a volatile market. Auto-deleveraging means that if a position bankrupts without available liquidity, the positive side of the position deleverages, in order of profitability and leverage, the highest leveraged position first in queue. Traders are always shown where they sit in the auto-deleveraging queue, if such is needed. Although the BitMEX platform is optimized for mobile, it only has an Android app (which is not official). There is no iOS app available at present. However, it is recommended that users use it on the desktop if possible. BitMEX offers a variety of order types for users:
Futures and SwapsA futures contract is an agreement to buy or sell a given asset in the future at a predetermined price. On BitMEX, users can leverage up to 100x on certain contracts.Perpetual swaps are similar to futures, except that there is no expiry date for them and no settlement. Additionally, they trade close to the underlying reference Index Price, unlike futures, which may diverge substantially from the Index Price. BitMEX also offers Binary series contracts, which are prediction-based contracts which can only settle at either 0 or 100. In essence, the Binary series contracts are a more complicated way of making a bet on a given event. The only Binary series betting instrument currently available is related to the next 1mb block on the Bitcoin blockchain. Binary series contracts are traded with no leverage, a 0% maker fee, a 0.25% taker fee and 0.25% settlement fee. Bitmex LeverageBitMEX allows its traders to leverage their position on the platform. Leverage is the ability to place orders that are bigger than the users’ existing balance. This could lead to a higher profit in comparison when placing an order with only the wallet balance. Trading in such conditions is called “Margin Trading.”There are two types of Margin Trading: Isolated and Cross-Margin. The former allows the user to select the amount of money in their wallet that should be used to hold their position after an order is placed. However, the latter provides that all of the money in the users’ wallet can be used to hold their position, and therefore should be treated with extreme caution. https://preview.redd.it/eg4qk9qr3cc41.jpg?width=808&format=pjpg&auto=webp&s=c3ca8cdf654330ce53e8138d774e72155acf0e7e The BitMEX platform allows users to set their leverage level by using the leverage slider. A maximum leverage of 1:100 is available (on Bitcoin and Bitcoin Cash). This is quite a high level of leverage for cryptocurrencies, with the average offered by other exchanges rarely exceeding 1:20. BitMEX FeesFor traditional futures trading, BitMEX has a straightforward fee schedule. As noted, in terms of leverage offered, BitMEX offers up to 100% leverage, with the amount off leverage varying from product to product.However, it should be noted that trading at the highest leverages is sophisticated and is intended for professional investors that are familiar with speculative trading. The fees and leverage are as follows: https://preview.redd.it/wvhiepht3cc41.jpg?width=730&format=pjpg&auto=webp&s=0617eb894c13d3870211a01d51af98561907cb99 https://preview.redd.it/qhi8izcu3cc41.jpg?width=730&format=pjpg&auto=webp&s=09da4efe1de4214b0b5b9c7501aba5320e846b4c However, there are additional fees for hidden / iceberg orders. A hidden order pays the taker fee until the entire hidden quantity is completely executed. Then, the order will become normal, and the user will receive the maker rebate for the non-hidden amount. Deposits and WithdrawalsBitMEX does not charge fees on deposits or withdrawals. However, when withdrawing Bitcoin, the minimum Network fee is based on blockchain load. The only costs therefore are those of the banks or the cryptocurrency networks.As noted previously, BitMEX only accepts deposits in Bitcoin and therefore Bitcoin serves as collateral on trading contracts, regardless of whether or not the trade involves Bitcoin. The minimum deposit is 0.001 BTC. There are no limits on withdrawals, but withdrawals can also be in Bitcoin only. To make a withdrawal, all that users need to do is insert the amount to withdraw and the wallet address to complete the transfer. https://preview.redd.it/xj1kbuew3cc41.jpg?width=808&format=pjpg&auto=webp&s=68056f2247001c63e89c880cfbb75b2f3616e8fe Deposits can be made 24/7 but withdrawals are processed by hand at a recurring time once per day. The hand processed withdrawals are intended to increase the security levels of users’ funds by providing extra time (and email notice) to cancel any fraudulent withdrawal requests, as well as bypassing the use of automated systems & hot wallets which may be more prone to compromise. Supported CurrenciesBitMEX operates as a crypto to crypto exchange and makes use of a Bitcoin-in/Bitcoin-out structure. Therefore, platform users are currently unable to use fiat currencies for any payments or transfers, however, a plus side of this is that there are no limits for trading and the exchange incorporates trading pairs linked to the US Dollar (XBT), Japanese Yen (XBJ), and Chinese Yuan (XBC).BitMEX supports the following cryptocurrencies:
Trading Technologies International PartnershipHDR Global Trading, the company which owns BitMEX, has recently announced a partnership with Trading Technologies International, Inc. (TT), a leading international high-performance trading software provider.The TT platform is designed specifically for professional traders, brokers, and market-access providers, and incorporates a wide variety of trading tools and analytical indicators that allow even the most advanced traders to customize the software to suit their unique trading styles. The TT platform also provides traders with global market access and trade execution through its privately managed infrastructure and the partnership will see BitMEX users gaining access to the trading tools on all BitMEX products, including the popular XBT/USD Perpetual Swap pairing. https://preview.redd.it/qcqunaby3cc41.png?width=672&format=png&auto=webp&s=b77b45ac2b44a9af30a4985e3d9dbafc9bbdb77c The BitMEX Insurance FundThe ability to trade on leverage is one of the exchange’s main selling points and offering leverage and providing the opportunity for traders to trade against each other may result in a situation where the winners do not receive all of their expected profits. As a result of the amounts of leverage involved, it’s possible that the losers may not have enough margin in their positions to pay the winners.Traditional exchanges like the Chicago Mercantile Exchange (CME) offset this problem by utilizing multiple layers of protection and cryptocurrency trading platforms offering leverage cannot currently match the levels of protection provided to winning traders. In addition, cryptocurrency exchanges offering leveraged trades propose a capped downside and unlimited upside on a highly volatile asset with the caveat being that on occasion, there may not be enough funds in the system to pay out the winners. To help solve this problem, BitMEX has developed an insurance fund system, and when a trader has an open leveraged position, their position is forcefully closed or liquidated when their maintenance margin is too low. Here, a trader’s profit and loss does not reflect the actual price their position was closed on the market, and with BitMEX when a trader is liquidated, their equity associated with the position drops down to zero. In the following example, the trader has taken a 100x long position. In the event that the mark price of Bitcoin falls to $3,980 (by 0.5%), then the position gets liquidated with the 100 Bitcoin position needing to be sold on the market. This means that it does not matter what price this trade executes at, namely if it’s $3,995 or $3,000, as from the view of the liquidated trader, regardless of the price, they lose all the equity they had in their position, and lose the entire one Bitcoin. https://preview.redd.it/wel3rka04cc41.png?width=669&format=png&auto=webp&s=3f93dac2d3b40aa842d281384113d2e26f25947e Assuming there is a fully liquid market, the bid/ask spread should be tighter than the maintenance margin. Here, liquidations manifest as contributions to the insurance fund (e.g. if the maintenance margin is 50bps, but the market is 1bp wide), and the insurance fund should rise by close to the same amount as the maintenance margin when a position is liquidated. In this scenario, as long as healthy liquid markets persist, the insurance fund should continue its steady growth. The following graphs further illustrate the example, and in the first chart, market conditions are healthy with a narrow bid/ask spread (just $2) at the time of liquidation. Here, the closing trade occurs at a higher price than the bankruptcy price (the price where the margin balance is zero) and the insurance fund benefits. Illustrative example of an insurance contribution – Long 100x with 1 BTC collateral https://preview.redd.it/is89ep924cc41.png?width=699&format=png&auto=webp&s=f0419c68fe88703e594c121b5b742c963c7e2229 (Note: The above illustration is based on opening a 100x long position at $4,000 per BTC and 1 Bitcoin of collateral. The illustration is an oversimplification and ignores factors such as fees and other adjustments. The bid and offer prices represent the state of the order book at the time of liquidation. The closing trade price is $3,978, representing $1 of slippage compared to the $3,979 bid price at the time of liquidation.) The second chart shows a wide bid/ask spread at the time of liquidation, here, the closing trade takes place at a lower price than the bankruptcy price, and the insurance fund is used to make sure that winning traders receive their expected profits. This works to stabilize the potential for returns as there is no guarantee that healthy market conditions can continue, especially during periods of heightened price volatility. During these periods, it’s actually possible that the insurance fund can be used up than it is built up. Illustrative example of an insurance depletion – Long 100x with 1 BTC collateral https://preview.redd.it/vb4mj3n54cc41.png?width=707&format=png&auto=webp&s=0c63b7c99ae1c114d8e3b947fb490e9144dfe61b (Notes: The above illustration is based on opening a 100x long position at $4,000 per BTC and 1 Bitcoin of collateral. The illustration is an oversimplification and ignores factors such as fees and other adjustments. The bid and offer prices represent the state of the order book at the time of liquidation. The closing trade price is $3,800, representing $20 of slippage compared to the $3,820 bid price at the time of liquidation.) The exchange declared in February 2019, that the BitMEX insurance fund retained close to 21,000 Bitcoin (around $70 million based on Bitcoin spot prices at the time). This figure represents just 0.007% of BitMEX’s notional annual trading volume, which has been quoted as being approximately $1 trillion. This is higher than the insurance funds as a proportion of trading volume of the CME, and therefore, winning traders on BitMEX are exposed to much larger risks than CME traders as:
This system may appear controversial as first, though some may argue that there is a degree of uniformity to it. It’s also worth noting that the exchange also makes use of Auto Deleveraging which means that on occasion, leveraged positions in profit can still be reduced during certain time periods if a liquidated order cannot be executed in the market. More adventurous traders should note that while the insurance fund holds 21,000 Bitcoin, worth approximately 0.1% of the total Bitcoin supply, BitMEX still doesn’t offer the same level of guarantees to winning traders that are provided by more traditional leveraged trading platforms. Given the inherent volatility of the cryptocurrency market, there remains some possibility that the fund gets drained down to zero despite its current size. This may result in more successful traders lacking confidence in the platform and choosing to limit their exposure in the event of BitMEX being unable to compensate winning traders. How suitable is BitMEX for Beginners?BitMEX generates high Bitcoin trading levels, and also attracts good levels of volume across other crypto-to-crypto transfers. This helps to maintain a buzz around the exchange, and BitMEX also employs relatively low trading fees, and is available round the world (except to US inhabitants).This helps to attract the attention of people new to the process of trading on leverage and when getting started on the platform there are 5 main navigation Tabs to get used to:
In addition, BitMEX provides a variety of educational resources including an FAQ section, Futures guides, Perpetual Contracts guides, and further resources in the “References” account tab. For users looking for more in depth analysis, the BitMEX blog produces high level descriptions of a number of subjects and has garnered a good reputation among the cryptocurrency community. Most importantly, the exchange also maintains a testnet platform, built on top of testnet Bitcoin, which allows anyone to try out programs and strategies before moving on to the live exchange. This is crucial as despite the wealth of resources available, BitMEX is not really suitable for beginners, and margin trading, futures contracts and swaps are best left to experienced, professional or institutional traders. Margin trading and choosing to engage in leveraged activity are risky processes and even more advanced traders can describe the process as a high risk and high reward “game”. New entrants to the sector should spend a considerable amount of time learning about margin trading and testing out strategies before considering whether to open a live account. Is BitMEX Safe?BitMEX is widely considered to have strong levels of security. The platform uses multi-signature deposits and withdrawal schemes which can only be used by BitMEX partners. BitMEX also utilises Amazon Web Services to protect the servers with text messages and two-factor authentication, as well as hardware tokens.BitMEX also has a system for risk checks, which requires that the sum of all account holdings on the website must be zero. If it’s not, all trading is immediately halted. As noted previously, withdrawals are all individually hand-checked by employees, and private keys are never stored in the cloud. Deposit addresses are externally verified to make sure that they contain matching keys. If they do not, there is an immediate system shutdown. https://preview.redd.it/t04qs3484cc41.jpg?width=808&format=pjpg&auto=webp&s=a3b106cbc9116713dcdd5e908c00b555fd704ee6 In addition, the BitMEX trading platform is written in kdb+, a database and toolset popular amongst major banks in high frequency trading applications. The BitMEX engine appears to be faster and more reliable than some of its competitors, such as Poloniex and Bittrex. They have email notifications, and PGP encryption is used for all communication. The exchange hasn’t been hacked in the past. How Secure is the platform?As previously mentioned, BitMEX is considered to be a safe exchange and incorporates a number of security protocols that are becoming standard among the sector’s leading exchanges. In addition to making use of Amazon Web Services’ cloud security, all the exchange’s systems can only be accessed after passing through multiple forms of authentication, and individual systems are only able to communicate with each other across approved and monitored channels.Communication is also further secured as the exchange provides optional PGP encryption for all automated emails, and users can insert their PGP public key into the form inside their accounts. Once set up, BitMEX will encrypt and sign all the automated emails sent by you or to your account by the [[email protected]](mailto:[email protected]) email address. Users can also initiate secure conversations with the support team by using the email address and public key on the Technical Contact, and the team have made their automated system’s PGP key available for verification in their Security Section. The platform’s trading engine is written in kdb+, a database and toolset used by leading financial institutions in high-frequency trading applications, and the speed and reliability of the engine is also used to perform a full risk check after every order placement, trade, settlement, deposit, and withdrawal. All accounts in the system must consistently sum to zero, and if this does not happen then trading on the platform is immediately halted for all users. With regards to wallet security, BitMEX makes use of a multisignature deposit and withdrawal scheme, and all exchange addresses are multisignature by default with all storage being kept offline. Private keys are not stored on any cloud servers and deep cold storage is used for the majority of funds. Furthermore, all deposit addresses sent by the BitMEX system are verified by an external service that works to ensure that they contain the keys controlled by the founders, and in the event that the public keys differ, the system is immediately shut down and trading halted. The exchange’s security practices also see that every withdrawal is audited by hand by a minimum of two employees before being sent out. BitMEX Customer SupportThe trading platform has a 24/7 support on multiple channels, including email, ticket systems and social media. The typical response time from the customer support team is about one hour, and feedback on the customer support generally suggest that the customer service responses are helpful and are not restricted to automated responses.https://preview.redd.it/8k81zl0a4cc41.jpg?width=808&format=pjpg&auto=webp&s=e30e5b7ca93d2931f49e2dc84025f2fda386eab1 The BitMEX also offers a knowledge base and FAQs which, although they are not necessarily always helpful, may assist and direct users towards the necessary channels to obtain assistance. BitMEX also offers trading guides which can be accessed here ConclusionThere would appear to be few complaints online about BitMEX, with most issues relating to technical matters or about the complexities of using the website. Older complaints also appeared to include issues relating to low liquidity, but this no longer appears to be an issue.BitMEX is clearly not a platform that is not intended for the amateur investor. The interface is complex and therefore it can be very difficult for users to get used to the platform and to even navigate the website. However, the platform does provide a wide range of tools and once users have experience of the platform they will appreciate the wide range of information that the platform provides. Visit BitMEX |
![]() | This is part one of three articles where i will discuss what i have learnt whilst looking into Cosmos. I will provide links throughout the article to provide reference to sections as well as a list of sources at the bottom of the article for you to look into specific areas in more detail if required. Hopefully it will be useful for those interested in learning more about the project. submitted by xSeq22x to cosmosnetwork [link] [comments] Cosmos is still very early in development process with components such as IBC which connects two blockchains together currently in research / specification stage, as a result can change by the time its released. What is Cosmos?Cosmos is a network and a framework for interoperability between blockchains. The zones are powered by Tendermint Core, which provides a high-performance, consistent, secure PBFT-like consensus engine, where strict fork-accountabilityguarantees hold over the behaviour of malicious actors. Cosmos is not a product but an ecosystem built on a set of modular, adaptable and interchangeable tools.In Tendermint, consensus nodes go through a multi-round voting proposal process first before coming to consensus on the contents of a block. When 2/3 of those nodes decide on a block, then they run it through the state transition logic providing instant finality. In current proof of work consensus for Ethereum, the consensus process is inverted, where miners pick the transactions to include in a block, run state updates, then do “work” to try and mine the block. Tendermint BFT can handle up to thousands of transactions per second (depending on the number of validators). However, this only takes into account the consensus part, the application layer is the limiting factor though. Ethermint (described below) has achieved up to 200 tps to give you an idea of the speed available per blockchain which is significantly more than current versions of Ethereum and Bitcoin etc. The Tendermint consensus is used in a wide variety of projects, some of the most notable include Binance Chain, Hyperledger Burrow. It’s important to note though that just using Tendermint consensus doesn’t mean they can connect to other chains with the cosmos ecosystem, they would need to fork their code to implement IBC as a native protocol to allow interoperability through IBC. see https://raw.githubusercontent.com/devcorn/hackatom/mastetminfo.pdf for high res The Tendermint consensus algorithm follows a traditional approach which relies on all validators to communicate with one another to reach consensus. Because of the communication overhead, it does not scale to 1000s of validators like Bitcoin or Ethereum, which can have an unlimited number of validators. Tendermint works when there are 100s of validators. (Cosmos Hub currently has a maximum of 100 validators and the maximum tested so far with Tendermint is 180 validators)Therefore, one of the downsides of a blockchain built using Tendermint is that, unlike Bitcoin or Ethereum, it requires the validators to be known ahead of time and doesn’t allow for miners to come and go as they please.Besides this, it also requires the system to maintain some notion of time, which is known to be a complex problem in theory. Although in practice, Tendermint has proven this can be done reasonably well if you use the timestamp aggregates of each node. In this regard, one could argue that Tendermint consensus protocol is “less decentralized” than Bitcoin because there are fewer validators, and they must be known ahead of time. Tendermint’s protocol guarantees safety and liveness, assuming more than 2/3 of the validators’ voting power is not Byzantine (i.e., malicious). In other words, if less than 1/3 of the network voting power is Byzantine, the protocol can guarantee safety and liveness (i.e., validators will never commit conflicting blocks at the same height and the blockchain continues to make progress).https://www.preethikasireddy.com/posts/how-does-cosmos-work-part1To see the process of how Tendermint works please see this diagram as well as more info here SovereigntyCosmos goal is to provide sovereignty through governance to developers by making it easy to build blockchains via the Cosmos SDK and provide interoperability between them, using Tendermint consensus. This is their main differentiator compared to competition like Polkadot and Ethereum 2.0. Ethereum 2.0 and Polkadot are taking a different approach by only using shared security, where there is a root chain which controls the security / prevents double spending for all connected blockchains.In Hub governance all stakers vote, the validators vote is superseded if the delegator votes directly Governance is where all stakers vote on proposals to determine what changes are implemented in the future for their own blockchain, stakers can either choose to delegate their vote to the validator or they can instead vote directly. Without sovereignty all DAPPs share the same underlying environment. If an application requires a new feature in the EVM it has to rely entirely on the governance of the Ethereum Platform to accept it for example. However, there are also tradeoffs to having sovereignty as each zone is going to need a way to incentivise others to validate / create blocks on the Zone by running Full Nodes. Whilst it may be easy to create a blockchain using the cosmos SDK and to mint a token, there are the legal costs / regulation associated with creating your own token. How are you going to distribute the tokens? How are you going to list them on exchanges? How are you going to incentivise others to use the token without being classed as a security? All of which have led to a significant reduction in the number of ICOs being done. With every zone needing their own validator set, there’s going to be a huge number of validators required each trying to persuade them to validate their zone with only a finite number of validators available. Each Zone / App is essentially a mini DAO and not all are going to be comfortable about having their project progress been taken out of their hands and instead relying on the community to best decide on the future (unless they control 2/3 of the tokens). The Cosmos Hub has proved this can be successful, but others may be risk averse to having their application be a mini DAO. Should someone / competitor acquire 1/3 of the tokens of a zone then they could potentially prevent any further progress being made by rejecting all governance votes (this would be very costly to do on the Cosmos Hub due to its high amount staked, but for all the other less secure zones this potentially may be an issue). Security for some zones will likely be a lot lower with every developer needing to validate their own blockchain and tokenise them with POS with no easy way to validate the setup of a validator to ensure its secure. Whilst the Cosmos hub is very secure with its current value staked, how secure zone’s will be with significantly less staked remains to be seen. Whilst providing soverignty was Cosmos’s main goal from the start, they are also looking at being able to provide shared security by having validators of a connected Hub also validate /create new blocks on the connected zone’s blockchain for them as well. They are still going to need some way to incentivise the validators to this. Another option is if the developers didn’t want to create a token, nor want sovereignty etc, then they could just build a DAPP on the EVM on a zone such as Ethermint. As can be seen their are potential advantages and disadvantages to each method, but rather than forcing shared security like Ethereum and Polkadot, Cosmos is giving the developer the choice so will be interesting to see which they prefer to go for. Layers of a blockchainFrom an architecture standpoint, each blockchain can be divided into three conceptual layers:
The Cosmos SDK is a generalized framework that simplifies the process of building secure blockchain applications on top of Tendermint BFT. The goal of the Cosmos SDK is to create an ecosystem of modules that allows developers to easily spin up application-specific blockchains without having to code each bit of functionality of their application from scratch. Anyone can create a module for the Cosmos SDK and using ready built modules in your blockchain is as simple as importing them into your application. The Tendermint BFT engine is connected to the application by a socket protocol called the Application Blockchain Interface (ABCI). This protocol can be wrapped in any programming language, making it possible for developers to choose a language that fits their needs. https://preview.redd.it/5vpheheqmba31.png?width=770&format=png&auto=webp&s=ec3c58fb7fafe10a512dbb131ecef6e841e6721c Hub and Spoke TopologyCosmos follows a hub and spoke topology as its not feasible to connect every zone together. If you were to connect every blockchain together the number of connections in the network would grow quadratically with the number of zones. So, if there are 100 zones in the network then that would equal 4950 connections.Zones are regular heterogenous blockchains and Hubs are blockchains specifically designed to connect Zones together. When a Zone creates an IBC connection with a Hub, it can automatically access (i.e. send to and receive from) every other Zone that is connected to it. As a result, each Zone only needs to establish a limited number of connections with a restricted set of Hubs. Hubs also prevent double spending among Zones. This means that when a Zone receives a token from a Hub, it only needs to trust the origin Zone of this token and each of the Hubs in its path. Hubs do not verify or execute transactions committed on other zones, so it is the responsibility of users to send tokens to zones that they trust. There will be many Hubs within Cosmos network the first Hub to launch was the Cosmos Hub whose native staking token is called ATOM. ATOM tokens are specific to just the Cosmos Hub which is one hub of many, each with their own token. Transaction fees for the Cosmos Hub will be payable in multiple tokens so not just ATOMs whereas other Hubs such as IRIS has made it so that all transaction fees are paid in IRIS for transactions on its hub. As mentioned, the Cosmos Hub is one of many hubs in the network and currently has a staking ratio of around 70% with its token ATOM having a market cap of just over $800 million. IRISnet was the second Hub to launch which currently has around 28% bonded with its token IRIS which has a market cap of just under $17 million. The Third Hub about to be launched later this month has its token SENT which has a market cap of around $3.4 million. As you can see the security of these 3 hubs differ wildly and as more and more hubs and then zones are brought online there is going to need to be a lot of tokens / incentivisation for validators. Ethermint Standard Cosmos zones / hubs don’t have smart contract functionality and so to enable this, as the Application layer is abstracted from the consensus layer via ABCI API described earlier, it allows Cosmos to port the code over from other blockchains such as Ethereum and use it with the Tendermint Consensus to provide access to the Ethereum Virtual Machine. This is what is called Ethermint. This allows developers to connect their zones to specialised zones such as Ethermint to build and run smart contracts based on Solidity, whilst benefiting from the faster performance of the tendermint Conensus over the existing POW implementation currently. Whereas a normal Go Ethereum process runs at ~12.5 transactions per second (TPS), Ethermint caps out at 200 TPS. This is a comparison against existing Ethereum speeds, whilst obviously Ethereum are working on their own scaling solutions with Ethereum 2.0 which will likely be ready around the same time. Existing tools / dapps used on ethereum should easily be able to be ported over to Ethermint by the developer if required. In addition to vertical scaling (with the increase in tps by using Tendermint consensus), it can also have multiple parallel chains running the same application and operated by a common validator set. So if 1 Ethermint zone caps out at 200 TPS then 4 Ethermint zones running in parallel would theoretically cap out at 800 TPS for example. https://preview.redd.it/e2pghr9smba31.png?width=554&format=png&auto=webp&s=a6e472a6e4a0f3845b03c36caef8b42d77125e46 There is a huge number of developers / apps currently built on Ethereum, should a developer choose to migrate their DAPP over to Ethermint they would lose native compatibility with those on Ethereum (except through Peg Zone), but would gain compatibility with those running on Ethermint and others in the cosmos ecosystem. You can find out more about Ethermint here and here IBCIBC stands for inter-blockchain communication protocol and is an end-to-end, connection-oriented, stateful protocol for reliable, ordered, authenticated communication between modules on separate distributed ledgers. Ledgers hosting IBC must provide a certain set of functions for consensus transcript verification and cryptographic commitment proof generation, and IBC packet relayers (off-chain processes) are expected to have access to network protocols and physical datalinks as required to read the state of one ledger and submit data to another.In the IBC architecture, modules are not directly sending messages to each other over networking infrastructure, but rather creating messages to be sent which are then physically relayed via “Relayers”. “Relayers” run off-chain and continuously scan the state of each ledger via a light client connected to each of the 2 chains and can also execute transactions on another ledger when outgoing datagrams have been committed. For correct operation and progress in a connection between two ledgers, IBC requires only that at least one correct and live relayer process exists which can relay between the ledgers. Relays will need to be incentivised to perform this task (the method to which hasn’t been established as of this writing) The relay process must have access to accounts on both chains with sufficient balance to pay for transaction fees. Relayers may employ application-level methods to recoup these fees, such by including a small payment to themselves in the packet data. More information on Relayers can be found here https://preview.redd.it/qr4k6cxtmba31.png?width=1100&format=png&auto=webp&s=d79871767ced4bcb0b2632cc137c118f70c3863a A high-level overview of the process is that Zone 1 commits an outbound message on its blockchan about sending say 1 x Token A to Hub1 and puts 1 x Token A in escrow. Consensus is reached in Zone 1, and then it’s passed to the IBC module to create a packet which contains the reference to the committed block, source and destination channel/ connection and timeout details and is added to Zone 1’s outbound queue as proof. All relayers (who run off-chain) are continuously monitoring the state of Zone 1 via the Zone 1 light client. A Relayer such as Relayer 1 is chosen and submits a proof to Hub1 that Zone 1. Hub 1 then sends a receipt as proof that it has received the message from Zone 1, relayer1 sends it to Zone 1. Zone 1 then removes it from its outbound queue and sends proof via another receipt to Hub1. Hub1 verifies the proof and mints the token. https://preview.redd.it/qn7895rumba31.png?width=770&format=png&auto=webp&s=96d9d808b2284f87d45fa0bd7b8bff297c86c2da This video below explains the process in more detail as well as covers some of the other points i raise later in this article so worth a watch (time stamped from 22:24 to 32:25) and also here from 38:53 to 42:50 https://youtu.be/5h8DXul4lH0?t=1344 Whilst there is an option for UDP style transfer where a zone will send a message to a Hub and it doesn’t care whether it gets there or in any order etc, Token transfers are going to require the TCP style connections in IBC where there is a send, receipt and then another receipt as explained above. Each Send, receipt followed by another receipt is going to take at least 2 blocks and so using Cosmos Hub block times as an example with 6.88 second block times a transfer between one zone and hub could take a minimum of 41.28 seconds. You also then have to factor in the amount of other transactions going through those at that time and relevant gas price to see whether it is able to use 2 consecutive blocks or whether it may take more. This is also explained in this video “ILP Summit 2019 | Cosmos and Interledger | Sunny Aggarwal” (time stamped) from to 12:50 to 15:45 In Part Two we will look at potential issues with multi hop routing, token transfers across multiple routes and Peg Zones, whilst also looking at other interoperability solutions that would resolve some of these issues and compliment the cosmos ecosystem. Part Two can be found here |
![]() | submitted by levi_d-19 to Redeeem [link] [comments] https://preview.redd.it/r59lj11bjjx31.png?width=563&format=png&auto=webp&s=f2ddf550d8fc01e63928de67693c2c2c15d125da When we launched the Redeeem affiliate program we did a lot of research on other crypto companies, and what their affiliate policies were. We studied the many structures to an affiliate program, and we made a list of the top 10 crypto affiliate programs. A few popular affiliate program models:
LocalBitcoins https://localbitcoins.com/ https://preview.redd.it/0zy08bsxjjx31.png?width=504&format=png&auto=webp&s=30b0b2f9c140d681a3dd9330f7b44d1d433dbe14 LocalBitcoins is a peer-to-peer trading site for bitcoin to 100's of other currencies. A fantastic option to get access to bitcoin. LocalBitcoins offers a 20% commission for your affiliates directly to your Local Bitcoins wallet. If you refer both a buyer and seller, you will get a commission from both referrals or 40% of the total transaction. Payouts will be paid daily to your LocalBitcoins wallet for one (1) year from user's registration. Redeeem https://www.redeeem.com/ https://preview.redd.it/26jy3yj4kjx31.png?width=508&format=png&auto=webp&s=30d1d56ceba2ea9cc405af6729cce46248d1f5ad Founded in 2018, Redeeem is a fast, safe and easy way to buy and sell gift cards using cryptocurrencies. The goal is to accelerate the adoption of Bitcoin into the global economy and showcase its endless potential. For every person that signs up with your affiliate link you earn 1% of their total crypto trade volume, paid nightly in bitcoin. This has no expiration nor limits so you continue to earn passively as long as your old and new affiliates trade. Abra https://www.abra.com/ Founded in 2014 by Bill Barhydt, serial entrepreneur and global mobile-banking veteran, our team is based in Silicon Valley and committed to forever changing how the world moves money. Abra's Affiliate Program lets you offer a $25 joining bonus to your referrals, and earn $25 for each affiliate that will sign up using your Referral Link. For affiliates and new users to receive their $25, they must either 1) Deposit a minimum of $5 to their Abra wallet via a US bank account or eligible American Express card; Or 2) Deposit crypto and exchange it to other assets EXCEPT for BTC, BCH, ETH or LTC. This option will allow the referrer and referred to receive 0.75% of the exchange total, up to $25. The referred user must also have accrued a minimum of $5 in rewards to receive the payment. Binance https://www.binance.com/en https://preview.redd.it/41719u90ljx31.png?width=1284&format=png&auto=webp&s=beda5720d18f614ed2621b36ce32d6fd9e1fb025 Binance is a global cryptocurrency exchange that provides a platform for trading more than 100 cryptocurrencies. Since early 2018, Binance is considered as the biggest cryptocurrency exchange in the world in terms of trading volume. Inviters and referrals can share up to 40% referral commissions from their trading fees under Binance's upgraded Referral Program. Inviters can choose to share a portion of the commissions received of the friends they invite and set the sharing rate as 0%, 5% or 10% (for inviters with daily average BNB of less than 500, and base referral rate is 20%). For inviters that have a daily average BNB of more than 500, their base referral rate is bumped up to 40% and have the option to share 15% or 20% with their referrals. All referral commissions (both those received by inviters and those shared with their invited friends) are calculated in real-time and transferred to the respective Binance accounts every hour from 12:00 AM until 1:00 AM (UTC) of the next day. CEX.IO https://cex.io/ https://preview.redd.it/tu065lucljx31.png?width=1115&format=png&auto=webp&s=ae09a725648954d62c055a3090fb61b56a2d189c Established in 2013 as the first cloud mining provider, CEX.IO has become a multi-functional cryptocurrency exchange, trusted by over a million users. CEX.IO offers cross-platform trading via website, mobile app, WebSocket and REST API, providing access to high liquidity orderbook for top currency pairs on the market. Current Affiliate program offers a 30% commission on the fee of exchange transactions of every new user that signs up with your Referral link. Changelly https://changelly.com/ https://preview.redd.it/og6x94thljx31.png?width=1208&format=png&auto=webp&s=c462b8dd39c33026ab3f33f42c6369e60a23bff9 Changelly is a non-custodial instant cryptocurrency exchange. They act as an intermediary between crypto exchanges and users, offering access to 130+ cryptocurrencies. The company mission is making exchange process effortless for everyone who wants to invest in cryptocurrency. Operating since 2015, the platform and its mobile app attract over a million visitors monthly who enjoy high limits, fast transactions, and 24/7 live support. Loyal customers get a special feature in the Affiliate Program. Customers who share their affiliate link or add the Changelly widget can get 50% profit from every transaction made by new users that signed up via your referral link. The link is permanent, and the reward is given in bitcoin equivalent. YouHodler https://www.youhodler.com/ https://preview.redd.it/5re0e4zxljx31.png?width=980&format=png&auto=webp&s=a9e260730dbd4fa50069875cd9fc8c612c468499 YouHodler is a Blockchain-based Financial Ecosystem focused on cryptocurrency-backed lending with fiat loans. YouHodler lending platform provides USD and/or EUR loans, secured by collateral in BTC, ETH, XRP, and other popular cryptocurrencies. The YouHodler Referral Program allows you to earn $25 with each successfully activated account from your referral link and promo code. Everyone that follows your link and activates their account (funding their account and using at least one product such as Turbocharge or conversion) also gets $25 instantly. Aside from the instant reward, you can also receive 50% in average of YouHodler's revenue from the next 10 products your invitee gets. Cryptohopper https://www.cryptohopper.com/ https://preview.redd.it/clq699w4mjx31.png?width=1189&format=png&auto=webp&s=b194202d7997a07391abf28f7aa2ba4946c30d0c Cryptohopper was started by two brothers. After hearing about the opportunities of cryptocurrencies for the first time, they were hooked. One of them was successful as a daytrader. The other brother, a brilliant web developer, didn't have the funds to invest. This got him thinking, what if there was a way to let a bot trade for you. It would work 24/7, trading as many coins as you wanted it to, constantly monitoring the market. You can earn a minimum of $1.90 a month for each user who signs up for an Explorer Hopper, $4.90 for each Adventure Hopper referral and $9.90 for each Hero! To maximize your earnings, each referral will also earn you up to 15% over each of their payments, including; signals, strategies and marketplace items. It all counts. Trezor https://trezor.io/ https://preview.redd.it/boazp1gamjx31.png?width=1044&format=png&auto=webp&s=97a64a99b3233f28b25e3226c09ad19823c4b465 Trezor is a Bitcoin hardware wallet and launched in August 2014. It was the first Bitcoin hardware wallet, offering secure cold storage plus the ability to spend with the convenience of a hot wallet. You will earn 12% - 15% referral commission for each sale. (net sale amount, excluding VAT and shipping). Monthly payouts via wire transfer or Bitcoin. Wire Transfer (USD, EUR and CZK) or Bitcoin. Coinhouse https://www.coinhouse.com/ https://preview.redd.it/w3bb6fggmjx31.png?width=1136&format=png&auto=webp&s=a69f7cc478dbcb1b46e858c7c0a10b36d38cddf1 Founded in 2014 in Paris, Coinhouse is a pioneer in cryptoassets investments. Both an online platform and a brick-and-mortar location, Coinhouse is the trusted partner for individuals and qualified investors looking to analyse, acquire, sell, and securely store cryptoassets. Earn 30% commission on your clients’ transactions for 1 year when they sign up using your unique and personalized tracking link. Get paid directly in Bitcoin to optimize your income. |
![]() | This is part one of three articles where i will discuss what i have learnt whilst looking into Cosmos. I will provide links throughout the article to provide reference to sections as well as a list of sources at the bottom of the article for you to look into specific areas in more detail if required. Hopefully it will be useful for those interested in learning more about the project. submitted by xSeq22x to CryptoCurrency [link] [comments] Cosmos is still very early in development process with components such as IBC which connects two blockchains together currently in research / specification stage, as a result can change by the time its released. What is Cosmos?Cosmos is a network and a framework for interoperability between blockchains. The zones are powered by Tendermint Core, which provides a high-performance, consistent, secure PBFT-like consensus engine, where strict fork-accountabilityguarantees hold over the behaviour of malicious actors. Cosmos is not a product but an ecosystem built on a set of modular, adaptable and interchangeable tools.In Tendermint, consensus nodes go through a multi-round voting proposal process first before coming to consensus on the contents of a block. When 2/3 of those nodes decide on a block, then they run it through the state transition logic providing instant finality. In current proof of work consensus for Ethereum, the consensus process is inverted, where miners pick the transactions to include in a block, run state updates, then do “work” to try and mine the block. Tendermint BFT can handle up to thousands of transactions per second (depending on the number of validators). However, this only takes into account the consensus part, the application layer is the limiting factor though. Ethermint (described below) has achieved up to 200 tps to give you an idea of the speed available per blockchain which is significantly more than current versions of Ethereum and Bitcoin etc. The Tendermint consensus is used in a wide variety of projects, some of the most notable include Binance Chain, Hyperledger Burrow. It’s important to note though that just using Tendermint consensus doesn’t mean they can connect to other chains with the cosmos ecosystem, they would need to fork their code to implement IBC as a native protocol to allow interoperability through IBC. see https://raw.githubusercontent.com/devcorn/hackatom/mastetminfo.pdf for high res The Tendermint consensus algorithm follows a traditional approach which relies on all validators to communicate with one another to reach consensus. Because of the communication overhead, it does not scale to 1000s of validators like Bitcoin or Ethereum, which can have an unlimited number of validators. Tendermint works when there are 100s of validators. (Cosmos Hub currently has a maximum of 100 validators and the maximum tested so far with Tendermint is 180 validators)Therefore, one of the downsides of a blockchain built using Tendermint is that, unlike Bitcoin or Ethereum, it requires the validators to be known ahead of time and doesn’t allow for miners to come and go as they please.Besides this, it also requires the system to maintain some notion of time, which is known to be a complex problem in theory. Although in practice, Tendermint has proven this can be done reasonably well if you use the timestamp aggregates of each node. In this regard, one could argue that Tendermint consensus protocol is “less decentralized” than Bitcoin because there are fewer validators, and they must be known ahead of time. Tendermint’s protocol guarantees safety and liveness, assuming more than 2/3 of the validators’ voting power is not Byzantine (i.e., malicious). In other words, if less than 1/3 of the network voting power is Byzantine, the protocol can guarantee safety and liveness (i.e., validators will never commit conflicting blocks at the same height and the blockchain continues to make progress).https://www.preethikasireddy.com/posts/how-does-cosmos-work-part1To see the process of how Tendermint works please see this diagram as well as more info here SovereigntyCosmos goal is to provide sovereignty through governance to developers by making it easy to build blockchains via the Cosmos SDK and provide interoperability between them, using Tendermint consensus. This is their main differentiator compared to competition like Polkadot and Ethereum 2.0. Ethereum 2.0 and Polkadot are taking a different approach by only using shared security, where there is a root chain which controls the security / prevents double spending for all connected blockchains.Governance is where all stakers vote on proposals to determine what changes are implemented in the future for their own blockchain, stakers can either choose to delegate their vote to the validator or they can instead vote directly. Without sovereignty all DAPPs share the same underlying environment. If an application requires a new feature in the EVM it has to rely entirely on the governance of the Ethereum Platform to accept it for example. However, there are also tradeoffs to having sovereignty as each zone is going to need a way to incentivise others to validate / create blocks on the Zone by running Full Nodes. Whilst it may be easy to create a blockchain using the cosmos SDK and to mint a token, there are the legal costs / regulation associated with creating your own token. How are you going to distribute the tokens? How are you going to list them on exchanges? How are you going to incentivise others to use the token without being classed as a security? All of which have led to a significant reduction in the number of ICOs being done. With every zone needing their own validator set, there’s going to be a huge number of validators required each trying to persuade them to validate their zone with only a finite number of validators available. Each Zone / App is essentially a mini DAO and not all are going to be comfortable about having their project progress been taken out of their hands and instead relying on the community to best decide on the future (unless they control 2/3 of the tokens). The Cosmos Hub has proved this can be successful, but others may be risk averse to having their application be a mini DAO. Should someone / competitor acquire 1/3 of the tokens of a zone then they could potentially prevent any further progress being made by rejecting all governance votes (this would be very costly to do on the Cosmos Hub due to its high amount staked, but for all the other less secure zones this potentially may be an issue). Security for some zones will likely be a lot lower with every developer needing to validate their own blockchain and tokenise them with POS with no easy way to validate the setup of a validator to ensure its secure. Whilst the Cosmos hub is very secure with its current value staked, how secure zone’s will be with significantly less staked remains to be seen. Whilst providing soverignty was Cosmos’s main goal from the start, they are also looking at being able to provide shared security by having validators of a connected Hub also validate /create new blocks on the connected zone’s blockchain for them as well. They are still going to need some way to incentivise the validators to this. Another option is if the developers didn’t want to create a token, nor want sovereignty etc, then they could just build a DAPP on the EVM on a zone such as Ethermint. As can be seen their are potential advantages and disadvantages to each method, but rather than forcing shared security like Ethereum and Polkadot, Cosmos is giving the developer the choice so will be interesting to see which they prefer to go for. Layers of a blockchainFrom an architecture standpoint, each blockchain can be divided into three conceptual layers:
The Cosmos SDK is a generalized framework that simplifies the process of building secure blockchain applications on top of Tendermint BFT. The goal of the Cosmos SDK is to create an ecosystem of modules that allows developers to easily spin up application-specific blockchains without having to code each bit of functionality of their application from scratch. Anyone can create a module for the Cosmos SDK and using ready built modules in your blockchain is as simple as importing them into your application. The Tendermint BFT engine is connected to the application by a socket protocol called the Application Blockchain Interface (ABCI). This protocol can be wrapped in any programming language, making it possible for developers to choose a language that fits their needs. https://preview.redd.it/go1bgareiba31.png?width=770&format=png&auto=webp&s=c9a2c9faa9c99dd8c7a7b6925c7ea281e203eb47 Hub and Spoke TopologyCosmos follows a hub and spoke topology as its not feasible to connect every zone together. If you were to connect every blockchain together the number of connections in the network would grow quadratically with the number of zones. So, if there are 100 zones in the network then that would equal 4950 connections.Zones are regular heterogenous blockchains and Hubs are blockchains specifically designed to connect Zones together. When a Zone creates an IBC connection with a Hub, it can automatically access (i.e. send to and receive from) every other Zone that is connected to it. As a result, each Zone only needs to establish a limited number of connections with a restricted set of Hubs. Hubs also prevent double spending among Zones. This means that when a Zone receives a token from a Hub, it only needs to trust the origin Zone of this token and each of the Hubs in its path. Hubs do not verify or execute transactions committed on other zones, so it is the responsibility of users to send tokens to zones that they trust. There will be many Hubs within Cosmos network the first Hub to launch was the Cosmos Hub whose native staking token is called ATOM. ATOM tokens are specific to just the Cosmos Hub which is one hub of many, each with their own token. Transaction fees for the Cosmos Hub will be payable in multiple tokens so not just ATOMs whereas other Hubs such as IRIS has made it so that all transaction fees are paid in IRIS for transactions on its hub. As mentioned, the Cosmos Hub is one of many hubs in the network and currently has a staking ratio of around 70% with its token ATOM having a market cap of just over $800 million. IRISnet was the second Hub to launch which currently has around 28% bonded with its token IRIS which has a market cap of just under $17 million. The Third Hub about to be launched later this month has its token SENT which has a market cap of around $3.4 million. As you can see the security of these 3 hubs differ wildly and as more and more hubs and then zones are brought online there is going to need to be a lot of tokens / incentivisation for validators. EthermintStandard Cosmos zones / hubs don’t have smart contract functionality and so to enable this, as the Application layer is abstracted from the consensus layer via ABCI API described earlier, it allows Cosmos to port the code over from other blockchains such as Ethereum and use it with the Tendermint Consensus to provide access to the Ethereum Virtual Machine. This is what is called Ethermint.This allows developers to connect their zones to specialised zones such as Ethermint to build and run smart contracts based on Solidity, whilst benefiting from the faster performance of the tendermint Conensus over the existing POW implementation currently. Whereas a normal Go Ethereum process runs at ~12.5 transactions per second (TPS), Ethermint caps out at 200 TPS. This is a comparison against existing Ethereum speeds, whilst obviously Ethereum are working on their own scaling solutions with Ethereum 2.0 which will likely be ready around the same time. Existing tools / dapps used on ethereum should easily be able to be ported over to Ethermint by the developer if required. In addition to vertical scaling (with the increase in tps by using Tendermint consensus), it can also have multiple parallel chains running the same application and operated by a common validator set. So if 1 Ethermint zone caps out at 200 TPS then 4 Ethermint zones running in parallel would theoretically cap out at 800 TPS for example. https://preview.redd.it/oboyonufiba31.png?width=554&format=png&auto=webp&s=18560aa44596fc2357590b54ddb39fd8ee1c8783 There is a huge number of developers / apps currently built on Ethereum, should a developer choose to migrate their DAPP over to Ethermint they would lose native compatibility with those on Ethereum (except through Peg Zone), but would gain compatibility with those running on Ethermint and others in the cosmos ecosystem. You can find out more about Ethermint here and here IBC IBC stands for inter-blockchain communication protocol and is an end-to-end, connection-oriented, stateful protocol for reliable, ordered, authenticated communication between modules on separate distributed ledgers. Ledgers hosting IBC must provide a certain set of functions for consensus transcript verification and cryptographic commitment proof generation, and IBC packet relayers (off-chain processes) are expected to have access to network protocols and physical datalinks as required to read the state of one ledger and submit data to another. In the IBC architecture, modules are not directly sending messages to each other over networking infrastructure, but rather creating messages to be sent which are then physically relayed via “Relayers”. “Relayers” run off-chain and continuously scan the state of each ledger via a light client connected to each of the 2 chains and can also execute transactions on another ledger when outgoing datagrams have been committed. For correct operation and progress in a connection between two ledgers, IBC requires only that at least one correct and live relayer process exists which can relay between the ledgers. Relays will need to be incentivised to perform this task (the method to which hasn’t been established as of this writing) The relay process must have access to accounts on both chains with sufficient balance to pay for transaction fees. Relayers may employ application-level methods to recoup these fees, such by including a small payment to themselves in the packet data. More information on Relayers can be found here https://preview.redd.it/twjzlc8hiba31.png?width=1100&format=png&auto=webp&s=2e546142573b61af031e27dac83ddca675a4b693 A high-level overview of the process is that Zone 1 commits an outbound message on its blockchan about sending say 1 x Token A to Hub1 and puts 1 x Token A in escrow. Consensus is reached in Zone 1, and then it’s passed to the IBC module to create a packet which contains the reference to the committed block, source and destination channel/ connection and timeout details and is added to Zone 1’s outbound queue as proof. All relayers (who run off-chain) are continuously monitoring the state of Zone 1 via the Zone 1 light client. A Relayer such as Relayer 1 is chosen and submits a proof to Hub1 that Zone 1. Hub 1 then sends a receipt as proof that it has received the message from Zone 1, relayer1 sends it to Zone 1. Zone 1 then removes it from its outbound queue and sends proof via another receipt to Hub1. Hub1 verifies the proof and mints the token. https://preview.redd.it/d4dclm3iiba31.png?width=770&format=png&auto=webp&s=9ca521efc8580800067e1c4e3f74c0ab8df30555 This video below explains the process in more detail as well as covers some of the other points i raise later in this article so worth a watch (time stamped from 22:24 to 32:25) and also here from 38:53 to 42:50 https://youtu.be/5h8DXul4lH0?t=1344 Whilst there is an option for UDP style transfer where a zone will send a message to a Hub and it doesn’t care whether it gets there or in any order etc, Token transfers are going to require the TCP style connections in IBC where there is a send, receipt and then another receipt as explained above. Each Send, receipt followed by another receipt is going to take at least 2 blocks and so using Cosmos Hub block times as an example with 6.88 second block times a transfer between one zone and hub could take a minimum of 41.28 seconds. You also then have to factor in the amount of other transactions going through those at that time and relevant gas price to see whether it is able to use 2 consecutive blocks or whether it may take more. This is also explained in this video “ILP Summit 2019 | Cosmos and Interledger | Sunny Aggarwal” (time stamped) from to 12:50 to 15:45 In Part Two we will look at potential issues with multi hop routing, token transfers across multiple routes and Peg Zones, whilst also looking at other interoperability solutions that would resolve some of these issues and compliment the cosmos ecosystem. Part Two can be found here |
![]() | In MoonBot the user can select between two Exchanges — Binance and Bittrex. Each Exchange has its own API protocols – which is an interface addressed through a set of commands for trading through third-party applications. The API specifications are unique to each exchange. submitted by MoonTrader_io to Moontrader_official [link] [comments] The Exchange connection differs both in the functionality of the Exchange itself (the presence of OCO, iceberg orders, conditional orders, leverage) and the implementation of the API, as well as in respect of limits on user actions, WebSocket channels, and other specifics. In the MoonTrader terminal, at the development stage, a separate project will be allocated to create a module for quick addition of the exchanges. The “Arbitrage” mode of the terminal will also be a separate tool:
At the second stage, the list will be expanded by the exchanges with similar mechanics and set of API commands. At the third stage, the Exchanges that are of interest to the audience from the arbitration point of view and the ones that have sufficient market coverage will be added. https://preview.redd.it/6r2t96pjv6k31.png?width=794&format=png&auto=webp&s=c634234b260d91bd0a07fac92f028f3ad08f99e4 Originally posted on our blog. Make sure to check our ICO at moontrader.io |
2020-04-25. SPOT API. New field permissions. Defines the trading permissions that are allowed on accounts and symbols. permissions is an enum array; values: . SPOT; MARGIN; permissions will replace isSpotTradingAllowed and isMarginTradingAllowed on GET api/v3/exchangeInfo in future API versions (v4+).; For an account to trade on a symbol, the account and symbol must share at least 1 permission ... GitHub Gist: instantly share code, notes, and snippets. A single connection to stream.binance.com www.binance.kr is only valid for 24 hours; expect to be disconnected at the 24 hour mark The websocket server will send a ping frame every 3 minutes. If the websocket server does not receive a pong frame back from the connection within a 10 minute period, the connection will be disconnected. The Binance API is a method that allows you to connect to the Binance servers via Python or several other programming languages. With it, you can automate your trading. More specifically, Binance has a RESTful API that uses HTTP requests to send and receive data. The Binance Websocket API returns financial data in JSON objects or arrays. Endpoints cover depth, kline, trade, and user data. Developers can use the API to create currency exchange applications and services. Binance is bitcoin and cryptocurrency exchange platform.
[index] [336] [139] [335] [256] [572] [262] [266] [584] [117] [616]
Binance Triangular Arbitrage ... 20x Faster 2x Easier Socket API Live Updates - Duration: 7:26. DeKay Arts ... How to handle Whale-Watch API Calls - Duration: 10:43. DeKay ... Video showing how to create API keys for Binance exchange. Simple and fast. Streaming a WebCam using Express, OpenCV, and Socket IO - Duration: 11:35. Web Dev Junkie 38,694 views. ... Binance Margin Trading API Overview and Demo - Duration: 22:57. step by step tutorial about API key creation on Binance exchange. REST API concepts and examples - Duration: 8:53. WebConcepts ... 17:57. How to use Websockets Stream for Binance Exchange in less than 10 lines of code. - Duration: 11:24. DeKay Arts ...