Bitcoin: Uniswap defi frenzy, Kraken is now a US bank

CRYPTOCURRENCY SPREADSHEET THAT ROCK - by Moosy Research | Cryptocurrency spreadsheet | cryptosheets | cryptosheet excel | google sheets api apis bitcoin coinmarketcap - cointrexer ctrxl botmon rex json rest script crypto sheets cool private public binance bitmex more sheet

See all sheets on:
CRYPTOCURRENCY SPREADSHEET THAT ROCK - by Moosy Research | Cryptocurrency spreadsheet | cryptosheets | cryptosheet excel | google sheets api apis bitcoin coinmarketcap - cointrexer botmon rex json rest script crypto sheets cool private public bitmex binance huobi and many more
Binance Jersey
Bitpanda Global Exchange
Coinbase Pro / GDAX
Luno (formerly BitX)
gas google apps script javascript app script google sheets code sha256 signature private request api call rest
submitted by moosylog to Cointrexer [link] [comments]

Bitcoin price quote for Linux shell

I love to work with the Linux shell (bash; Linuxmint/Ubuntu) all day, and from time to time I want to know the current price of Bitcoin and Ether. So I created a simple Linux shellscript, which displays both cross-prices to USD and EUR within the shell after typing in "btc". I know that I could use the web for this task, but I like it this way and I also don't want to be constantly informed (i.e. with an app on the smartphone).
Here it is, let me know if you like it.
#!/bin/bash # this simple Linux shell script uses the "jq" command line # JSON data processor pls. install "jq" first (sudo apt # install jq) then save the skript with an editor as i.e. # "btc" under a path for executables, (i.e. ~/.local/bin/) # and make it executable ("sudo chmod +x btc"). The script # uses market data from the kraken api; pls. feel free to # use any other api. The script displays the current price # of Bitcoin and Ether in USD and EUR. If you don't like # the colors, try playing around with the "tput setaf x" # (color of characters) and "tput setab x" (background # color); you might find the information frome here: # # useful. Enjoy! JSN1=$(curl -s "") JSN2=$(curl -s "") JSN3=$(curl -s "") JSN4=$(curl -s "") QRAW1=$(echo $JSN1 | jq ".result.XXBTZUSD.c[0]") QRAW2=$(echo $JSN2 | jq ".result.XXBTZEUR.c[0]") QRAW3=$(echo $JSN3 | jq ".result.XETHZUSD.c[0]") QRAW4=$(echo $JSN4 | jq ".result.XETHZEUR.c[0]") RGX='\"\([0-9]\+\)\.[0-9]\+\"' Q1=$(echo $QRAW1 | sed "s/${RGX}$/\1/g") Q2=$(echo $QRAW2 | sed "s/${RGX}$/\1/g") Q3=$(echo $QRAW3 | sed "s/${RGX}$/\1/g") Q4=$(echo $QRAW4 | sed "s/${RGX}$/\1/g") RED=`tput setaf 1` GREEN=`tput setaf 2` WHITEBACK=`tput setab 7` CYANBACK=`tput setab 6` BOLD=`tput bold` RESET=`tput sgr0` echo "${WHITEBACK}${BOLD}${RED}Bitcoin: $""$Q1"" €""$Q2${RESET}"" ${BOLD}${CYANBACK}${GREEN}Ether: $""$Q3"" €""$Q4${RESET}" 
submitted by fatrattombala to Bitcoin [link] [comments]

06-15 18:15 - 'Most exchanges offer a public API for the latest trades, some in sub-second resolution. You can write a little program or script that uses e.g. curl for retrieving the data. Here is an example for retrieving the 1000 lates...' by /u/HerthaParuskie removed from /r/Bitcoin within 0-5min

Most exchanges offer a public API for the latest trades, some in sub-second resolution. You can write a little program or script that uses e.g. curl for retrieving the data. Here is an example for retrieving the 1000 latest trades in the Bitcoin/Euro trading pair:
curl -s [link]^^2 
(this works in Linux bash and macOS Terminal app. For Win10 you'd have to download curl from, I think.)
You receive the latest 1000 trades in JSON format with a precise timestamp each (at Kraken that's currently around 30 to 60 minutes worth of trading timespan). If you need the prices in USD, use XBTUSD instead of XBTEUR. The full API documentation is at [[link]3
Context Link
Go1dfish undelete link
unreddit undelete link
Author: HerthaParuskie
1: *ww*k*ak**.com/f*atures/api#g*t-re*en**tra*es 2: a*i*k*a**/Tr*d*s?pair=*B*E*R 3: w*w.**aken*co*/f***ures/*pi#get-*e*ent-trades]*^1
Unknown links are censored to prevent spreading illicit content.
submitted by removalbot to removalbot [link] [comments]

☘️ ReX: get all the data you want from these lovely APIs into a spreadsheet

ReX is a tool that makes APIs accessible for everyone.
Add your own public or private request queries and explore/learn about these lovely API endpoints.There is a list of public and private commands already available in the tool as well:
Rex is ready to fetch from: Binance, Bitfinex, BitMEX, Bittrex, Bybit, , Deribit, Kraken, CoinMarketCap, CryptoCompare
Get it on:

Index: API apis json request public private sha google apps script gas spreadsheet excel xls xlss bitcoin ethereum btc eth exchange
submitted by moosylog to Cointrexer [link] [comments]

CtrXL - Exchange Balances live in Google Sheets

What is CtrXL?
A spreadsheet to track the value of your cryptocurrencies on exchanges, cold storage and/or other locations.
CtrXL can securely pull your Balances from your exchange using Read-Only APIs or by Manual entry in the sheet.
Values are calculated to both BTC and Fiat and can be automatically saved, based on a time interval.
The sheet comes with eye candy Dashboard elements that can be easily adjusted to your own preference.

Download (copy) the sheet

Use Cases:
You have currencies on multiple Exchanges or multiple accounts on one exchange
You manage cryptocurrency for others and want a single pane of glass
You have cryptos in 'other' locations; like cold storage, offline / hardware wallets or elsewhere (example: Ledger Nano)
You are looking for a sheet that is simple to understand and can be extended and/or customized

Bibox Binance Bit2C Bitfinex Bitpanda BitMex Bitsane Bitstamp Bittrex CEX.IO Coinbase Coinbase Pro GDAX Cryptopia Deribit Gate.IO Gemini Gopax HitBTC Huobi Indodax Kraken Kucoin Liquid Luno OKEx Poloniex - Manual: Cold Storage

Bibox Binance Binance Jersey Bit2C Bitfinex BitMEX Bitpanda Bitsane Bitstamp Bittrex CEX IO Coinbase + Pro Cryptopia Deribit Gate.IO Gemini HitBTC Huobi Kraken Kucoin OKEx Poloniex - Manual: Cold Storage Gdax API APIS SHA authentication script gas Google Apps Script json balance balances excel sheet google sheet google sheets live cryptosheet cryptosheets crytpo sheet bitcoin ethereum sha256 sha512 private request public request javascript code exchange exchanges REST error json get put cointrexer moosy research spreadsheet spreadsheets code inject pull gate io cex io cexio template data prices import coinmarketcap cmc totals balance balances cryptos cryptocurrency currencies cryptotracking crytotracker Pull Bitcoin and Cryptocurrencies Price and Data in Google Sheets BTC ETH LTC Bitcoin Ethereum Litecoin google script template exchange balance balance api apis spreadsheet excel sheet sheets encryption panda bitpanda global exchange Bibox Binance Bit2C Bitfinex BitMEX Bitpanda Bitsane Bitstamp Bittrex CEX IO Coinbase + Pro Cryptopia Deribit Gate IO GateIO Gemini Gopax HitBTC Huobi Indodax Kraken Kucoin Liquid LUNO OKEx Poloniex and or Manual / Cold storage deribit sha256 sha512 ECDSA signature google script gas google apps script javascript JWT JSON Web Token private exchange balanace request
submitted by moosylog to Cointrexer [link] [comments]

DEVCON2 report: Day Three - Final day

previous days
Question: the 3 days of devcon are over. Are people interested in reports on the next 3 days of international Blockchain week (demo day + 2 days of global Blockchain summit)
Event update
The buzz during the day was around the "stick puzzle" that Bok Khoo was giving out to people. It is just a stick, with a loop of string. He gets you to turn away, he uses "the trick" to put it onto your bag and then you try to get it off.
The WeChat channel was just filled with everyone asking where they can get it, and the screaming that they can't figure it out. Only about 5 people reported they were able to solve it (I haven't yet)
I'm biased, but I thought the announcement from Microsoft with the update of cryptlets was a big deal. The morning sessions covered a few different oracle systems, the afternoon had lots of IPFS sessions.
Microsoft - A Lap around Cryptlets
Microsoft was a sponsor of Devcon1 & 2 Ethereum is a 1st class citizen Support for community & partners - Bizspark, Meetups, Workshops
Announcing: Bletchley v1 Distributed Ledger stack V1 is a private Ethrerum consortium, that you can spin up for your own enterprise / group
Cryptlets are being developed to help with security, identity, etc. How do you get trusted external data feeds injected into the Blockchain? Doing things on a specific interval (every 15 mins) When price of something hits a threshold (oil goes above $40/barrel) Secure IP protected algorithms, but still share with blockchain network. Use libraries for common platforms (.Net, Java, etc)
Cryptlets vs Oracle Cryptlets will have a marketplace on Azure that will allow you to purchase and utilise
Use case: Trigger on an event Wake up on 4pm, if market was open that day, then give me the price of gold for that day.Get signature of attested server, attested sender.
Use case: Control Using smart contract like a traditional DB. Declare data you are keeping track of, and the functions/"stored proc" to update that data. Cryptlet runs off chain, and can be scaled up.
Utility cryptlet. Use an attribute in solidity contract with cryptlet details Developer references at design time the cryptlet they want the contract to call Contract cryptlet, deploy the cryptlet at same time as contract.
Why would you want Azure to do this? SGX allows you to create "secure enclaves", can have complete isolation on the hardware chip where it is not modifable. Provides a secure enclave at the CPU level. Can give full attestation right down to the silicon. Will be provided as a enclave container on Azure. Will be released for .NET core CLR first, then other languages. Can create cryptlet libraries that you can scale and put into the Azure marketplace. An ecosystem for developers & ISVs to consume and publish.
Bletchley v1 released today will let you spin up a private consortium. Before today, it took a long time to try and deploy a private consortium (can take weeks to read doco, Now takes 5 minutes to deploy! Creates a private consortium, puts each member in its own separate subnet
Mist Vision and Demo I was too busy sharing the release posts of Microsoft project bletchey v1, missed this talk. It did look interesting, I will watch this one later. Idea: Reward for bandwidth. Providing connection could replace mining as entrance point for desktop computers. Allow you to have a trickle so you can trigger smart contracts. Standardised backends, so that you can swap out the underlying node between geth, blockapps, etc.
Web3.js Etehereum JS API Smart conracts are EVM opcodes, Helps translates calls to JSON RPC calls. Helps do the ABI encoding when sending data from JS to EVM It kept on growing, many different utility functions being thrown in. Is time to clean it up and be refactored.
They are now building a NEW web3.js The communication will be socket based, will enable subscriptions. Everything will be based on promises to subscribe to events, like log events. Bunch of other newer cleaner methods and ways to do things like deploying contracts.
Smart contract security
Was a very good postmorteum of The DAO and things that could be done to mitigate it in the future.
An issue with The DAO was trying to do a massive jump from centralisation all the way to full decentralisation. Meant no one could step up and make a decision on how to save it. We need to make smaller steps towards full decentralisation as we learn as a community how to do this. Same security patterns as yesterday's talks: check invarients, beware 1024 call stack depth, reentry exploit (update state BEFORE executing calls), timestamps are manipulatable. Updateable contracts. Who can update it? Community multisig? We need better rools: formal verification, compiler warnings, improved IDEs, trusted libraries, excape hatches
Conclusion: It is still very early days in this space, be careful.
A Provably Honest Oracle Model: Auditable Offchain Data Gathering & Computations
Oracalize is the most widely used oracle (until everyone starts using Microsoft Azure cryptlets ;-) ) Contract calls Oracalize contract with the data they want, off chain they see this get the data, Oracalise then trigger their contract externally, which does a callback to your contract with the data. Can use external notary servers. Can get proof from multiple external services to get a higher level of confidence about data (e.g. stock price from a few feeds). Off-chain (auditable_ computation) AWS sandbox 2.0. Put the execution package onto IPFS, AWS gets it and executes it, signs it. Fully Distributed Cloud Thanks to the Ethereum Blockchain Provides blockchain based execution environments Global market for computing resources. Idea is to do what we did before with "grid computing" use the idle capacity of computers. But this time do a trickle of micropayments. Allows people to harness this global power to execute their tasks in a global "distributed cloud".
The Final frontier: The company smart conract Helping companies to incorporate on the blockchain.
Smart oracles Connecting to external resources is difficult. Hard to try and use external currencies (like a bank account / fiat money) to make transactions. Could hook in paypal, HSBC, wells fargo, etc. Can provide your own payment services as an API to a smart oracle for smart contracts to consume. Do off chain data storage by calling smart oracle API Roadmap: more data sources & more payment methods
IPFS & Ethereum: Updates IPFS is AMAZING, seriously go watch the full 1 hour talks Juan has given in previous years.
Current web has current issues. Centralisation, etc. IPFS is a new hypermedia transfer protocol Content can be retrieved not from specific servers, but instead via it's hash so that it can come from anywhere in the network (maybe from the person next to you who has cached it). It is highly modular, all of the transfer protocals, routing, naming, etc. are all swapable Is available as GO-IPFS & now JS-IPFS Means now you can run IPFS in the browser IPFS was great for static content, but not so great for dynamic content. Low latency pub/sub protocol will help with dynamic data. Created a distributed peer to peer chat app using this new dynamic content protocol. IPLD a common link-tree hash format Will be able to use IPFS to retrieve ethereum blockchain blocks DIRECTLY Can use IPFS as a package manager to retrieve them in a distributed manner.
Many projects are using Ethereum & IPFS Uport, Digix, Infura, Ujo, Eris, Blockfreight. Filecoin was created as a way to try and incentivize nodes to keep files longer time. People rent out hdd space to earn filecoin. Exchange bitcoin/filecoin. Use filecoin to store files in network. Filecoin is going to be built on top of the public Ethereum blockchain, as a virtual blockchain / token.
IPFS Libp2p & Ethereum networking
Network connectivity between any 2 nodes can be difficult. Censorship, bandwidth, network issues, etc. Having to deal with different networking topologies and access. Libp2p & Devp2p is different. Devp2p is for Ethereum. LIbp2p is modular, can swap out components to change network access, encryption methods, etc. Can build up a MEGA mesh network, by utilising traditional wired internet, radio, bluetooth between some nodes. Web browser using web socket, to a node, which routes across network, to zigbee to a IoT device. Libp2p & Devp2p could merge and augment each other. Could create the libp2p components to replace the devp2p bits Any 2 nodes that speak the same protocol can communicate and be a part of the network chain. Experiment. They took the browser based version of EVM. Then used Libp2p to talk to the Ethereum network. Had a complete ethereum node running in a browser.
Uport Universal identity platform Current challenges: key management. Ux for average person. Dapps via mobile. Identity and data ownership. How do you keep a consistent identity, even if you lose a key. Have some multisig contracts that you can use to keep track. Social recovery, use your friends to attest it is really you. Keep private key on mobile, do transactions on the desktop, scan a QR code to sign the transaction on your phone and send it off.
A Deep Dive into the Colony Foundation Protocol
It is an open source governance protocol built on Ethereum Problem with voting is how to prevent Sybil attacks. Votes are weighted by a reputation score. Reputation is non-transferable that can only be earned. Total weighted voting helps mitigate this.
Chain orchestration tooling & smart contract package management
Eris is tooling for developers. Package manager to build your own blockchain. Can compose a chain, e.g. geth + tendermint consensus. Init, install, do. Can easily install on Mac/bew, linux/apt-get, Windows/choco
The Golem Project: Ethereum-based market for computing power Anyone can make an offer to sell computing power. e.g. Distributed rendering Want to create a standard framework that anyone can use to submit and process jobs.
Status: Integrating Ethereum Into Our Daily Lives Want to get ethereum everywhere. "Mist for Mobile" Everyone is using their mobile phones for everything, but mostly using instant messaging. What would Ethereum in a IM window look? Created a IM mobile app that has a local geth node. tart up, it asks you to create a password, it generates a pub/private pair. Then can send messages via whisper, and the messages are signed with your public key. Can load Dapps up in the local webview and interact with them. Allows you to create "chat Dapps", that you interact with via text. Like chatbots
Maker Ecosystem Overview Dai: seeking stability on blockchain. Stablecoin engine: smart contract that holds collateral reserves and controls the Dai lifecycle. MKR: open source community managing risk of the system In the last year, investing in a solid technical core. More slow and audit things. Moving into the next phase of stablecoin development. Their latest project is the "Simplecoin project" Meeting Thereum community's need for stability. An independent platform for creating centrally administered simple stablecoins. Issues create their own rule sets: Collateral types, participant whitelists, security parameters. Example: Shrutebucks. The only people who own it are Dwight, Jim & Pam. They backed it with 1/3 ETH 1/3 DGX 1/3 DUSD.
Orbit. A distributed peer to peer app on IPFS Created a full distributed chat room, itself distributed through IPFS. It is integrated with uPort for identification Using uPort allows you to verify that you are talking to the correct person in the chat channel. All their messages are signed with their public keys He also created a full distribited twitter clone, using uport for the identity as well. Orbit-db key value store DB that stores its data on IPFS. Eventually consistent Appends data to the DB, an event is sent to those subscribed on pub/sub so they can see the latest root hash. Based on CRDT Ethereum + Pubsub + CRDTs + IPFS = super power primatives to build dynamic distributed apps
Development considerations with distributed apps. Need to ensure that apps work offline. No centralised servers. No data silos. Provide integration path.
Future work: could you use uPort for ACL like permissions? Mobile use cases, how to make it work nicely on mobiles
Building scalable React Dapp architecture React + Ethereum He has a configured boilerplate template. Has contract scaffolding. Enforced contract Linting/testing. Wallet generation/identity. Preconfigured web3 instance. UI: Mature react arhitecture "react boilerplate". Prices listed in USD with ETH/btc via kraken api. A basic multi-contract example Dapp. Offline first, dapp runs without internet. Uses Redux. State models in UI & blockchains work well. PostCSS, CSS Modules, sanitize.cs. Redux, immutableJS, reslect, redux-saga, i18n, redux-router. Web3, ethdeploy, dapple, solium, eth-lightwallet, chaithereum, ethereumjs0-testrpc Enforced contract testing in 2 languages.
Ethereum for Enterprise (BlockApps Strato)
Trying to make sure that Ethereum stays relevent to enterprise development. Why do you need a blockchain WITHIN an org, shouldn't they trust each other? Well different departments may not, they may reconcile differently, and can help automate/orchestrate between them. Blockchain is the "killer app" for cloud financial services. Legacy infrastructure, batch prossing, etc are all restricting fintech from progressing. Blockchain can happen in real time, can replace legacy. Ethereum is very flexible and programmable, works well. There are others based on Bitcoin (like Hyperledger). Ethereum + Blockapps = Extreme productivity + Proven Technology. Blockapps is extending Ethereum for Enterprise. Runs very well on Azure Enterprises don't want all their data exposed on public chain. Blockapps helps solve data privacy and scaling with multichain fabrics.
submitted by DavidBurela to ethereum [link] [comments]

Projet: Entrainement de stratégies de trading algorithmiques sur cryptomonnaies

Ce projet consiste en la conception d'un bot qui se connectera à une plateforme de trading ou il assurera le pilotage d'un portefeuille de crypomonnaies, exécutant des ordres d'achat et de vente.


Les cryptomonnaies ont acquis une forte popularité durant les récentes années, en tant qu'instruments financiers novateurs et faciles à utiliser, et beaucoup d'acteurs de la Fintech proposent maintenant des applications, frameworks, et librairies pour les mainpuler. Il existe également de nombreuses plateformes où les crypomonnaies peuvent être échangées, achetées et vendues avec des monnaies traditionnelles.
Le trading algorithmique a également connu une forte adoption et représente maintenant la majorité des transactions financières conduites sur les marchés internationaux.
Plusieurs outils peuvent être utilisés pour concevoir un bot qui se connecte à une plateforme de change de cryptomonnaie et conduire du trading algorithmique automatisé.


La première cryptomonnaie, Bitcoin, a été créée en 2009 par un utilisateur sous pseudonyme Satoshi Nakamoto, sur les bases des précédents travaux de la communauté des cypherpunk.
Voilà l'article original qui a présenté Bitcoin et la technologie de la blockchain sur lequel il s'appuie. En combinant plusieurs techniques fondées sur la cryptographie, Bitcoin permet à sa communauté d'utilisateurs de gérer collective la monnaie sans avoir à recourir à un superviseur central, court-circuitant le secteur bancaire.
Plusieurs principes alternatifs ont depuis été proposés, généralement avec de petite variations protocolaires: ce subreddit ou ce site web peuvent constituer de bons points d'entrée pour les découvrir.
De nombreuses plateformes de change ont également été créées en offrant des fonctionnalités et APIs de trading, mais la plupart des acteurs originaux ont été liquidés pour cause de fraude ou de hacks où une partie des fonds ont été volés. Parmi les acteurs actuels de bonne réputation proposant une API, on peut siter Bitstamp ou Kraken.

L'expérience DNN Bitcoin

Dans la phase initiale de développement du module PKP, l'environnement utilisés pour les TPs de ce cours, DNNBitcoin fut créé comme démonstrateur du moteur de bots pour l'hébergement d'un moteur de trading algorithmique communautaire.
Les utilisateurs pouvaient gratuitement enregistrer un compte et un Bot sur la plateforme, se connectant à plusieurs APIs de plateformes de change, et exécutant des stratégies de Market making. Plusieurs centaines de bots ont tourné simultanément à au plus fort de son utilisation. L'expérience a finalement été stoppée quand les plateformes de change supportées ont fermée, et du fait la maintenance conséquence du service, mais du code obsolète a été conservé dans l'extension DNN et peut constituer un point de départ sur la manière de procéder.

Comment fonctionnait le Bot historique?

Les principales règles d'exécutions, qui ont été conservées en état de refactoring incluaient:


Quand DNN Bitcoin a été développé, des connecteurs individuels étaient implémentés pour chaque plateforme supportée, par le biais de requêtes Http personnalisées.
La librairie XChange propose désormais une alternative plus confortable, avec de nombreuses plateformes supportées sous un même modèle objet, et plus de nécessité de se ternir à jour des différentes APIs. Pour un développement sous .Net, il devrait être possible de la porter en utilisant IKVM comme ça a été fait pour la librairie AIMA.

Authentification à la plateforme de change

Les plateformes authentifient généralement les comptes utilisateurs par un Hmac cryptographique (on signe le corps de la requête Http avec une clé privée fournie par la plateforme). La librairie XChange devrait prendre en charge cette opération à partir des clés obtenues en ligne.

Format des données

Les données sont généralement récupérées et renvoyées aux APIs des plateformes au format Json. A nouveau la librairie XChange devrait prendre en charge le formattage et fournir un ensemble de classes indépendantes des plateformes cibles.

Moteur de trading

DNNBitcoin fournit un framework léger pour la manipulation des monnaies et l'exécution de stratégies diverses, sous forme de classes .net implémentant une interface commune, avec une méthode qui prend en paramètres un portefeuille, les données de marché et historiques, et renvoie les ordres à exécuter. L'interface utilisateur de PKP transforme la structure des straégies en formulaires web que les utilisateurs peuvent accéder pour personnaliser les paramètres de leurs stratégies.
Ceci était suffisant pour implémenter différent types de stratégies, mais depuis, plusieurs librairies open-source offrant des moteurs de trading complets sont apparues, et fournissent très probablement une meilleure alternative.
La librairie Lean Framework constitue un bon candidat en .Net.

Historique et simulation

Le bot historique incluait également la fonctionnalité d'archivage en local des données historiques, permettant notamment les simulations, sur une période données, de stratégies spécifiques. L'utilisation d'un framework de trading dédié devrait fournir des moyens alternatifs d'obtenir les mêmes fonctionnalités.

Prérequis initiaux

La tâche initiale consiste à intégrer ensemble:
Il devrait s'agit principalement de conjoindre les librairies introduites, et fournir les méthodes pour faire circuler les données de l'une à l'autre.
Automapper est une librairie qui peut faciliter la mis en place de mapping entre les différents modèles objets.

Stratégies de trading

Ensuite, la tâche principale de ce projet est de mettre en oeuvre les stratégies de trading.
Des stratégies traditionnelles peuvent bien fonctionner, la librairie lean framework en fournit un certain nombre et vous pouvez exploer la panneau de droite du subreddit de trading algorithmique.
Ceci dit, les stratéiges les plus intéressantes et puissantes utiliseront les techniques d'IA étudiées en cours, comme les réseaux de neurones. Voir par exemple cet article pour une implémentation basique, et les plus récents exemples d'apprentissage profond dans la gallerie CNTK ou encore cet article.
submitted by jeansylvain to IA101ORT2018 [link] [comments]

How can I use Python to fetch Bitcoin / EUR price form Kraken API ?

My knowledge of programming is practically 0. I have completed 13+ hour course in codecademy and now realizing, it's not enough even for the simplest stuff I deem barely useful for me.
So, Twitter API is out (see: but Bitcoin looks interesting and why not use Kraken to get the latest BTC:EUR price (last trade closed array) and do something with it. Perhaps compared it to another pair in different currency and use FX exchange rate to calculate the difference. Simple enough? Sure, but...
Problem is, I cant figure out how to use this API and I need your help. EDIT: This part of the problem resolved. Please see 3)...
1) As I understand, to work with json and URL's i must import:
import json # import urllib.request, urllib.parse, urllib.error <-- no need for this stuff at the moment import requests #this is better 
2) I need to fetch public ticker info for XBT/EUR pair and this is where I get stuck
Any help pointing me to a right direction is welcome. Remember, I understand practically nothing about Python or any other programming language.
EDIT: added
3) How to read a key and value form a list, nested inside a nested dictionary by using a "key" form variable
submitted by JDJoe1 to learnpython [link] [comments]

Project: Training strategies for algorithmic crypto-currency trading

The project consists in creating a bot that connects to a trading platform and manages a wallet of cryptocurrencies, executing orders to buy or sell.


Cryptocurrencies have gained significant popularity over the past years as easy-to-use financial instruments, and many actors of the Fintech industry are now offering applications, frameworks and APIs to manipulate them. There are also multiple exchange platform where cryptocurrencies can be exchanged, purchased and sold with traditional fiat currencies.
Algorithmic trading has also seen a large adoption and now accounts for the majority of financial transactions conducted on global markets.
Accordingly, several tools can be used to build a bot that connects to a cryptocurrency exchange platform and performs automated algorithmic trading.


The first cryptocurrency, Bitcoin, was first published in 2009 by an anonymous user Satoshi Nakamoto, building on the previous works of the cypherpunk community.
Here is the original article that introduced Bitcoin and the blockchain technology it relies on. By combining several techniques leveraging Strong cryptography, Bitcoin allows its community of users to collectively manage the currency without the need for a central supervisor, undermining the need for banking actors.
Many alternate schemes were proposed since then, usually with small variations: this subreddit or that website may be good starting points to find out about them.
Many exchange were also created to offer trading capabilities, but most of the original actors were since then liquidated because of frauds or hacks where parts of the handled currency were stolen. Current reputable actors with APIs available include Bitstamp or Kraken.

The DNNBitcoin experiment

In the initial development stage of PKP, the environment currently used for this course hands'on sessions, DNNBitcoin was an early attempt at demonstrating the botting engine to host such an algorithmic trading engine.
Users could registered an account and a bot on the platform for free, connecting to several exchange APIs and running market making strategies. Several hundred bots were simultaneously run at some point. The experiment was eventually stopped, with all of the then supported exchanges shutting down, and a lot of maintenance involved, but some outdated code was still kept together with the DNN extension and provides some guidance on how to proceed.

How the legacy Bot worked

The main execution rules, which were left in the middle of some refactoring, include:


When DNNBitcoin was developped, individual connectors were implemented to each supported exchange by means of customized API requests.
The XChange library now provides a safer alternative with many exchanges supported and the burden to keep up to date with APIs left out the the library's developers. It should be possible to port it to .Net using IKVM as was done with the AIMA library.

Authenticating to the trade platform

Platform usually authenticate users with a variety of cryptographic Hmac authentication (signing sent data with a private key provided by the platform). The XChange library should take care of performing that operation, given the required keys obtained online.

Data format

Data is usually retrieved and passed to the APIs using the Json format. Again, the XChange library should take care of the formatting and provide a unified set of classes to be leveraged regardless of the target exchange platform.

Trading engine

DNNBitcoin provides a lightweight framework for manipulating currencies and running various trading strategies, in the form of .Net classes implementing a common interface, with a method taking as arguments the user wallet, market and historical data, and returning orders to be executed. The PKP UI engine would transform the strategies class into web forms, which users accessed to customize their own strategies.
This was enough to implement different kinds of strategies, but since then, several open source libraries offering a complete trading engine were released, and probably provide a better alternative.
The Lean Framework constitutes a good candidate to replace the existing light weight Framework.

History and Simulation

The legacy bot also included features to collect and deal with historical market data, allowing for backtesting simulations, for a given period, of specific strategies. Leveraging a dedicated trading library should provide some alternate mean to support the same feature.

Initial requirements

The initial task is that of tying together:
This should be a matter of integrating the previously introduced libraries, and providing methods to flow the Data between them.
Automapper is a library that can ease providing the mappings between the corresponding classes.

Trading strategies

Then the main task of this project is figuring out appropriate trading strategies. Several traditional strategies can be successful, the lean framework provides several of them and you can explore the right panel of the Algorithmic trading subredit, or in some other subreddits, among those cited in the course resources.
However, more interesting and powerful strategies leverage AI techniques, such as neural networks. See for instance this paper for a basic neural network implementation, or more recent deep learning examples in the CNTK gallery or this article.
submitted by jeansylvain to AI101EPF2017 [link] [comments]

Cannot Solve Api Problem

Hey guys, thanks in advance for the help!
I have been learning python for the last few months and am making some good progress. I have written a slew of bots and wanted to make a bot for a bitcoin exchange (just to see if I could). I chose kraken and now I am stuck on a certain thing, namely that I constantly get the error: "ValueError: too many values to unpack" when I run my function.
The function I am running is quite simple and is as follows:
import requests"", ["XXBTZEUR"]) print tradeinfo.json()["result"]["c"] 
The API documentation says:
Get ticker information
pair = comma delimited list of asset pairs to get info on
Result: array of pair names and their ticker info
 = pair name a = ask array(, ), b = bid array(, ), c = last trade closed array(, ), v = volume array(, ), p = volume weighted average price array(, ), t = number of trades array(, ), l = low array(, ), h = high array(, ), o = today's opening price 
So in my code I want the script to just retrieve the last trade closed array for Bitcoin-Euro trade pair. However I keep getting following error:
ValueError: too many values to unpack 
Below is everything that comes before it in case it helps:
Traceback (most recent call last): File "", line 17, in"", ["XXBTZEUR"]) File "C:\Python27\lib\site-packages\requests\", line 88, in post return request('post', url, data=data, **kwargs) File "C:\Python27\lib\site-packages\requests\", line 44, in request return session.request(method=method, url=url, **kwargs) File "C:\Python27\lib\site-packages\requests\", line 422, in request prep = self.prepare_request(req) File "C:\Python27\lib\site-packages\requests\", line 360, in prepare_request hooks=merge_hooks(request.hooks, self.hooks), File "C:\Python27\lib\site-packages\requests\", line 297, in prepare self.prepare_body(data, files) File "C:\Python27\lib\site-packages\requests\", line 435, in prepare_body body = self._encode_params(data) File "C:\Python27\lib\site-packages\requests\", line 85, in _encode_params for k, vs in to_key_val_list(data): ValueError: too many values to unpack 
If anyone could point me in the right direction and explain what I am doing wrong it would be a huge help! Thanks!
edit: Changed the name of the function from tinfo to tradeinfo to make it clearer.
submitted by Patsoldier to learnpython [link] [comments]

Kraken API Tutorial - YouTube Enabling 2FA on Your API Keys within your Kraken account Using the Bittrex API in Google Sheets How to build Bitcoin API using Python and Coinmarketcap ... Bitcoin Trading - Streaming Live Bitcoin prices through Exchange API

18/09/2020 Trending Bitcoin News and Market Sentiment, Weekly Edition, September 17th, 2020: Uniswap Governance Token Sends Users Into Frenzy, Kraken is First Crypto Exchange to Become US Bank; 17/09/2020 Becomes the Official Betting Partner for Arsenal F.C.; 12/09/2020 Trending Bitcoin News and Market Sentiment, Weekly Edition, 11th September, 2020: Bitcoin Holds Steady, Square With nervous investors worried an equity sell-off could spill over to bitcoin and crypto markets, the San Francisco-based Kraken exchange has warned September is historically bitcoin’s worst Buy, sell and margin trade Bitcoin (BTC) and Ethereum (ETH) in exchange with EUR, USD, CAD, GBP, and JPY. Leveraged trading on US based Bitcoin and Ethereum exchange. Take your crypto to the next level with Kraken. This week Kraken Financial became the first crypto company to receive a banking charter under Wyoming’s Special Purpose Depository Institution statute. On this Speaking of Bitcoin episode, join Kraken is more than just a Bitcoin trading platform. Come see why our cryptocurrency exchange is the best place to buy, sell, trade and learn about crypto.

[index] [31188] [10584] [28602] [14324] [18844] [13213] [20083] [9234] [24571] [15531]

Kraken API Tutorial - YouTube

This video shows you how to plug in to the various exchange APIs to grab pricing data in real time. BTC-e: MTGOX: http... A quick tutorial on how to enable 2FA on your API Keys within your Kraken account. For more information, please refer to the guide in our support center: htt... Kraken API Tutorial You will need a Kraken exchange account with funds available for trading in order to successfully connect your Kraken account to COINCUBE... In this video I will show you how to import live data and Historical data for Bitcoin, Ethereum, Ripple and other 1384 coins from web to excel. Data is refre... This is part 2 of our Bitcoin API tutorial. Here we parse the JSON data. JSON parser Create a free account to get an AP...