cryptocurrency

Tradingview Pine script `strategy.exit` and `strategy.close` don't respect `from_entry` value

怎甘沉沦 提交于 2021-02-11 15:17:58
问题 I have several different entries in my strategy, and I want to assign separate stop losses to them: // @version=4 strategy("Test strategy") strategy.entry("E0", strategy.long, limit=10000, when=close[1] > 10000) strategy.entry("E1", strategy.long, limit=10000, when=close[1] > 10000) strategy.exit("SL-E0", "E0", stop=9000) strategy.exit("SL-E1", "E1", stop=9500) As far as I understand the documentation (https://www.tradingview.com/pine-script-reference/#fun_strategy{dot}exit) the 2nd parameter

can we establish a blockchain (precisely DAG) as an infrastructure of a cryptocurrency, which uses only Proof Of Stack to securing transactions?

▼魔方 西西 提交于 2021-01-29 16:40:54
问题 Sorry for too long post, but I had no choise! So the question is “can we establish a blockchain (precisely DAG) as an infrastructure of a cryptocurrency, which uses only Proof Of Stack to securing transactions?”. What are the flaws of this approach? The scenario is like that: I develop and release the prototype software and run the first node. As a founder and the first member of the network, I made a to-do list of future develops of that software. The goal is improve software and strengthen

How to listen for incoming transactions not yet mined for a single address?

丶灬走出姿态 提交于 2021-01-28 00:04:34
问题 Using OpenEthereum, which is the json rpc call allowing to do it? I found the parity_pubsub module but I ve no idea of the parameter for getting not yet confirmed transactions. I also found https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#subscribe-pendingtransactions in the web3 module but it doesn t allows to filter transactions and the documentation doesn t explains how to use the full web3 api along OpenEthereum. The purpose The aim is to frontrun transactions for

Bittrex websockets encoding method?

微笑、不失礼 提交于 2020-01-25 07:25:13
问题 It´s not a big deal to mimic the websocket connection made to bittrex from www, using chromes dev tools: GET https://socket.bittrex.com/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B%22name%22%3A%22c2%22%7D%5D&_=1524596108843 This return a token "ConnectionToken":"gbLsm8C6Jck1mQTTFjmuIv5qgUuMZz/kXU1s+fAnjnW qUFQocNBfp3VOrd/y0acxWL5Fv7MZ54heRddLYZS+EMhLnaPPQiSZblvgJPCbLKqZTIkb" That needs to be used with: wss://socket.bittrex.com/signalr/connect? transport=webSockets&clientProtocol

“Account” object has no atribute get Huobi_python API

爱⌒轻易说出口 提交于 2020-01-15 10:08:52
问题 From the Huobi_python api, I'm trying to get the balance to show up sadly enough I get this error : "Traceback (most recent call last): File "C:/Users/Root/PycharmProjects/Huobi_API/TestZone.py", line 9, in print(balance.get(0).get(0).balance) AttributeError: 'Account' object has no attribute 'get'" I have no clue what I'm doing wrong or how to get the .get get to work Link to github: https://github.com/huobiapi/huobi_Python from huobi import * from huobi.model.constant import * request

Web scraping with beautifulsoup not finding anything

匆匆过客 提交于 2019-12-13 04:33:00
问题 I'm trying to scrape coinmarketcap.com just to get an update of a certain currency price, also just to learn how to web scrape. I'm still a beginner and can't figure out where I'm going wrong, because whenever I try to run it, it just tells me there are none. Although I know that line does exist. Any help is appreciated! import requests from bs4 import BeautifulSoup url = 'https://coinmarketcap.com/currencies/electroneum/' response = requests.get(url) html = response.content soup =

bitmex api php, cancel 1 order not working

坚强是说给别人听的谎言 提交于 2019-12-11 05:33:53
问题 I am using the Bitmex class from: https://github.com/y0un1verse/bitmex-api-php/blob/master/BitMex.php I dont have any issues using the functions already there. But when I tried adding my own function, it's not working properly. the original code for CANCELLING ALL ORDERS is: public function cancelAllOpenOrders($text = "") { $symbol = self::SYMBOL; $data['method'] = "DELETE"; $data['function'] = "order/all"; $data['params'] = array( "symbol" => $symbol, "text" => $text ); return $this -

Calculate large decimals (more than 15 digits) in Javascript

陌路散爱 提交于 2019-12-04 06:10:07
问题 As we know, Javascript has some issues (or features) with calculating decimal numbers. For example: console.log(0.1 + 0.2) // 0.30000000000000004 And we know that we can avoid it using different libraries (for example I use bignumber.js), and now we have what expected: console.log(Number(new BigNumber(0.1).plus(0.2))); // 0.3 <script src="https://cdnjs.cloudflare.com/ajax/libs/bignumber.js/6.0.0/bignumber.min.js"></script> BUT Bignumber.js has limitations: It accepts a value of type number

Calculate large decimals (more than 15 digits) in Javascript

老子叫甜甜 提交于 2019-12-02 09:41:22
As we know, Javascript has some issues (or features) with calculating decimal numbers. For example: console.log(0.1 + 0.2) // 0.30000000000000004 And we know that we can avoid it using different libraries (for example I use bignumber.js ), and now we have what expected: console.log(Number(new BigNumber(0.1).plus(0.2))); // 0.3 <script src="https://cdnjs.cloudflare.com/ajax/libs/bignumber.js/6.0.0/bignumber.min.js"></script> BUT Bignumber.js has limitations: It accepts a value of type number (up to 15 significant digits only), string or BigNumber object. We can pass a string (it's possible),

VBA - API call displayed in Excel

孤街浪徒 提交于 2019-11-27 02:12:39
I am trying to show prices of specific cryptocurrencies in an Excel sheet. I am extracting the JSON data from the API of CoinMarketCap - https://api.coinmarketcap.com/v1/ticker/ Ultimately, I am trying to get the price of Ripple (line 16), and then set cell B1 in my Excel sheet to display the price of ripple (line 17). This is my script, but it is not working for some reason. Sub test() Dim httpObject As Object Set httpObject = CreateObject("MSXML2.XMLHTTP") sURL = "https://api.coinmarketcap.com/v1/ticker/" sRequest = sURL httpObject.Open "GET", sRequest, False httpObject.Send sGetResult =