Skip to content
Advertisement

Tag: python-3.x

Historical ethereum prices – Coinbase API

Using the python coinbase API– The functions– get_buy_price, get_sell_price, get_spot_price, get_historical_data, etc… all seem to return bitcoin prices only. Is there a way of querying Ethereum prices? It would seem that currency_pair = ‘BTC-USD’ could be changed to something akin to currency_pair = ‘ETH-USD’ although this has no effect. I would expect that the API simply doesn’t support this, except

Think Python 2nd Edition Exercise 7-1

“Square Roots” loop: Copy the loop from “Square Roots” and encapsulate it in a function called mysqrt that takes a as a parameter, chooses a reasonable value of x, and returns an estimate of the square root of a. To test it, write a function named test_square_root that prints a table like this: Here’s what I wrote: Here’s what I

How to tell if Python module is a namespace module

In Python 3, modules can be namespace modules without an __init__.py (as per PEP 420) or as a regular module (i.e. ‘[modules] packages as they are implemented in Python 3.2 and earlier’ – PEP 420) that have an __init__.py or are a single .py file. How can you tell the difference between a namespace module and an ‘ordinary’ module? (I

Advertisement