8000 implemented a couple of the public API calls by marzig76 · Pull Request #1 · geminipy/geminipy · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# geminipy
A client for the Gemini bitcoin exchange
A library for the Gemini bitcoin exchange API
25 changes: 25 additions & 0 deletions geminipy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import json
import requests

class geminipy:

# set up default values
base_url = "https://api.gemini.com"
apikey = ""

def __init__(self, url = ""):
if url != "":
self.base_url = url

def symbols(self):
url = self.base_url + '/v1/symbols'
response = requests.get(url)
return response.content

def book(self, symbol):
if symbol == "":
return "Error: No symbol specified"

url = self.base_url + '/v1/book/' + symbol
response = requests.get(url)
return response.content
0