Ejemplo n.º 1
0
        // https://blockchain.info/api                                  // Bitcoin Developer APIs
        // https://blockchain.info/api/charts_api                       // Blockchain Charts & Statistics API

        public static void Test()
        {
            var dict = BlockchainInfoTicker.GetDictionary();

            cout(dict);
            var obj = BlockchainInfoStats.GetObject();

            cout(obj.ToString());

            BlockchainInfoPools pools5  = BlockchainInfoPools.GetObject("5days");
            BlockchainInfoPools pools10 = BlockchainInfoPools.GetObject("10days");
        }
Ejemplo n.º 2
0
        //--------- BlockchainInfo STATIC METHODS ----------------------------------------------------------------------

        // TODO: BlockchainInfo WebSocket

        /*            //var socket2 = StartWebSocket("wss://ws.blockchain.info/inv");
         *
         * // Debugging operations
         * //SendWebSocketMessage(socket2, "{'op':'ping'}");           // echo
         * //SendWebSocketMessage(socket2, "{'op':'ping_block'}");       // responds with the latest block
         * //SendWebSocketMessage(socket2, "{'op':'ping_tx'}");          // responds with the latest transaction (if subscribed to any addresses it will respond with the latest transaction involving those addresses)
         *
         * // Subscribe to notifications for all new bitcoin transactions
         * //SendWebSocketMessage(socket2, "{'op':'unconfirmed_sub'}");
         * //SendWebSocketMessage(socket2, "{'op':'unconfirmed_unsub'}");
         *
         * // Receive new transactions for a specific bitcoin address
         * //SendWebSocketMessage(socket2, "{'op':'addr_sub', 'addr':'$bitcoin_address'}");
         * //SendWebSocketMessage(socket2, "{'op':'addr_unsub', 'addr':'$bitcoin_address'}");
         *
         * // Receive notifications when a new block is found
         * //SendWebSocketMessage(socket2, "{'op':'blocks_sub'}");
         * //SendWebSocketMessage(socket2, "{'op':'blocks_unsub'}");*/

        public static BlockchainInfoStats GetStats()
        {
            return(BlockchainInfoStats.GetObject());
        }