This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "datafusion_playground" | |
version = "0.1.0" | |
authors = [""] | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
arrow = { git = "https://github.com/apache/arrow-rs", branch = "master" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _shapeshift_post_request(url_path, payload): | |
""" | |
Combines the provided url_path with Shapeshift's base url and performs | |
a post request with the provided payoad | |
""" | |
url = BASE_URL % url_path | |
# Filter out any values that are None | |
payload = {k: v for k, v in payload.items() if v is not None} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
BASE_URL = 'https://shapeshift.io/%s' | |
def _shapeshift_get_request(url_path): | |
""" | |
Combines the provided url_path with Shapeshift's base url and performs a get request. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Shapeshift.io API | |
Implements all the API calls on Shapeshift.io | |
All documentation is taken from https://info.shapeshift.io | |
""" | |
import requests | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
BASE_URL = 'https://shapeshift.io/%s' | |
def get_coins(): | |
url_path = 'getcoins' | |
url = BASE_URL % url_path | |
response = requests.get(url) | |
return response.json() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_normal_tx(withdrawal_address, input_coin, output_coin, | |
return_address=None, | |
destination_tag=None, | |
rs_address=None, | |
api_key=None): | |
url_path = "shift" | |
url = BASE_URL % url_path | |
payload = { | |
'withdrawal': withdrawal_address, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am amustafa on github. | |
* I am amustafa (https://keybase.io/amustafa) on keybase. | |
* I have a public key ASC9Aa_-YDNYvM5hKyuh4c6GgMW5dqXTlOWK_eXz-8L_zQo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +adam_mustafa is my blockchain ID. https://onename.com/adam_mustafa |