Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No clear instructions #12

Open
kyrypto opened this issue Jun 8, 2020 · 8 comments
Open

No clear instructions #12

kyrypto opened this issue Jun 8, 2020 · 8 comments
Labels
enhancement If you add and remove this label enough times, it enters a quantum superposition. good-first-issue I'll answer questions about ANSI Common Lisp, and the state of Quicklisp at time of removal thence. job offer preferably in exchange for bitcoin question Asking implied questions is not liable to disqualify you from collaboration with Adlai.

Comments

@kyrypto
Copy link

kyrypto commented Jun 8, 2020

I've loaded the bot, and all of the dependencies, with Quicklisp. But there's no clear guide on what to do next. I know I need to set the API keys, and some parameters, but there's no indication on how to do it. Any help? I intend only to experiment by the way, I don't expect this to be a magic money maker.

@adlai
Copy link
Owner

adlai commented Jun 18, 2020

On a scale ranging from "money to knowledge converter" to "knowledge to money converter", although not quite reaching either extreme, what purpose do you seek in your experimentation? Your answers to this question will guide me in answering yours. You may find that the information provided when closing Issue #6 can help you at almost any purpose along that scale, although I intentionally do not provide much code implementing those suggestions.

@kyrypto
Copy link
Author

kyrypto commented Jun 18, 2020

I'd convert money to knowledge, knowledge is invaluable. I seek to learn how trading bots can help me in my daily trading. I actually did notice issue #6, and I'm to the point where I need to "instantiate the gate class with relevant API credentials, a supplicant that manages that account, and a maker with the parameters for automated offer placement." I'm not sure how to do this, advice?

@adlai
Copy link
Owner

adlai commented Jun 18, 2020

The english verb "instantiate" corresponds quite closely to the Common Lisp function, make-instance. You might be using an implementatino that provides documentation to the running process, although if you can't find the invokation that reveals this, you can browse and download the documents provided by the kind folks at LispWorks, who are even good enough to link to where you can buy a printed copy of the language standard, should you prefer the official materials!

In your specific invocation of that class, you can provide the API credentials as thriither:

  • string arguments directly in the call to make-instance, by enclosing the credentials in double quotes, "thus";
  • locations of files containing saved copies of each datum, by providing pathnames as arguments and not enclosing the saved credentials in quotes;
  • or even, should you wish to avoid saving the private part of the credentials to the file system, provide each argument in the appropriate way:
(make-instance 'gate :pubkey #p"publickey"
                     :secret "I can't tell you, because you're not yet drunk")

I'd convert money to knowledge, knowledge is invaluable. I seek to learn how trading bots can help me in my daily trading.

I'll notify you, should I choose to sell information... the hubs have ears!

@kyrypto
Copy link
Author

kyrypto commented Jun 22, 2020

The english verb "instantiate" corresponds quite closely to the Common Lisp function, make-instance. You might be using an implementatino that provides documentation to the running process, although if you can't find the invokation that reveals this, you can browse and download the documents provided by the kind folks at LispWorks, who are even good enough to link to where you can buy a printed copy of the language standard, should you prefer the official materials!

In your specific invocation of that class, you can provide the API credentials as thriither:

  • string arguments directly in the call to make-instance, by enclosing the credentials in double quotes, "thus";
  • locations of files containing saved copies of each datum, by providing pathnames as arguments and not enclosing the saved credentials in quotes;
  • or even, should you wish to avoid saving the private part of the credentials to the file system, provide each argument in the appropriate way:
(make-instance 'gate :pubkey #p"publickey"
                     :secret "I can't tell you, because you're not yet drunk")

I'd convert money to knowledge, knowledge is invaluable. I seek to learn how trading bots can help me in my daily trading.

I'll notify you, should I choose to sell information... the hubs have ears!

Any chance of a cheat sheet to get it running with basic functionality?

@adlai
Copy link
Owner

adlai commented Jun 24, 2020

Any chance of a cheat sheet to get it running with basic functionality?

;;; after loading scalpl.asd, evaluate (asdf:load-system "scalpl/exch")
;;; where `exch` refers to the specific exchange you wish to use.
;;; after the code has finished compiling, switch to the scalpl.qd package
;;; and evaluate the following form:
(define-maker *any-name-you-choose*
              :supplicant (make-instance 'supplicant
                                         :gate (make-instance 'exch:exch-gate
                                                              ;; provide API credentials
                                                              ;; as explained above
                                               )
                                         :market (ensure-running (find-market "WTI" :exch)))
              :parameter1 value1
              :parameter2 value2)
;;; (enable-pretty-printer-abuse) for easier display of values

;;; I recommend that you first do this with an account that does not
;;; have any funds. You are quite likely to encounter the debugger,
;;; possibly multiple times in parallel, due to the fact that the
;;; program spawns several threads simultaneously.

;;; This line should terminate all threads, additionally exiting the debuggers
;;; started by the ones that crashed, and leave you at the regular prompt:
(mapc 'kill (mapcar 'task-thread (chanl:pooled-tasks)))

At this point, you can call the standard Common Lisp function, reinitialize-instance, with the market maker object stored in the *any-name-you-choose* variable, although I recommend that you start by reinitializing the components one by one. These components are the gate and supplicant instances, and you can access them quickly using a form such as (slot-reduce *any-name-you-choose* supplicant).

For the parameters to the define-maker macro, see https://github.com/adlai/scalpl/blob/master/qd.lisp#L254-L258
You will probably want to modify almost every single hardcoded number that appears in the various class definitions, and possibly even the ones inline in the code (e.g., search for the number 4/3), although currently only these five parameters are implemented as initial arguments.

@adlai adlai added the question Asking implied questions is not liable to disqualify you from collaboration with Adlai. label Jun 24, 2020
@adlai
Copy link
Owner

adlai commented Jun 25, 2020

I intend only to experiment by the way, I don't expect this to be a magic money maker.

Incidentally, you should not rely on the accounting arithmetic, since it was written for an exchange that has been discontinued by international law enforcement agencies, and other exchanges do not necessarily use equivalent computations.

@adlai adlai closed this as completed Jun 25, 2020
@adlai
Copy link
Owner

adlai commented Jul 1, 2020

I'll leave the issue open in case @kyrypto has further questions.

@adlai adlai reopened this Jul 1, 2020
@adlai adlai closed this as completed Aug 3, 2020
@adlai
Copy link
Owner

adlai commented Feb 13, 2021

Writing clear documentation is work, of the sort that I am not likely to do myself, neither for money nor pure unadulterated happiness, although I am still open to the idea of compensating someone else to do so.

@adlai adlai reopened this Feb 13, 2021
adlai referenced this issue Feb 13, 2021
NO SHOES, NO SHIRT... who d'ya expect to write these thinks!?
@adlai adlai added enhancement If you add and remove this label enough times, it enters a quantum superposition. good-first-issue I'll answer questions about ANSI Common Lisp, and the state of Quicklisp at time of removal thence. job offer preferably in exchange for bitcoin labels Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement If you add and remove this label enough times, it enters a quantum superposition. good-first-issue I'll answer questions about ANSI Common Lisp, and the state of Quicklisp at time of removal thence. job offer preferably in exchange for bitcoin question Asking implied questions is not liable to disqualify you from collaboration with Adlai.
Projects
None yet
Development

No branches or pull requests

2 participants