Skip to content

Instantly share code, notes, and snippets.

@tsu-nera
Created August 7, 2022 06:15
Show Gist options
  • Save tsu-nera/3cdb908d1b9e6f9bcea68542777221e2 to your computer and use it in GitHub Desktop.
Save tsu-nera/3cdb908d1b9e6f9bcea68542777221e2 to your computer and use it in GitHub Desktop.
libpython-clj and ccxt
(require '[libpython-clj2.python :as py :refer [import-module]])
(require '[libpython-clj2.require :refer [require-python]])
(py/initialize! :python-executable
"/home/tsu-nera/miniconda3/envs/bakuchi/bin/python3.10"
:library-path
"/home/tsu-nera/miniconda3/envs/bakuchi/lib/libpython3.10.so")
(require-python '[ccxt])
(require-python '[pprint :as pp])
(require '[libpython-clj2.python :as py :refer [py. py.. py.-]])
(def ex (ccxt/ftx))
(def tick
(when-let [resp (py. ex fetch_ticker "BTC/JPY")]
(-> resp py/->jvm)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment