jon_amen | Polymarket — 12/18/24, 11:52 AM
Today, we are releasing some documentation for Polymarket Data-API:
https://polymarket.notion.site/Polymarket-Data-API-Docs-15fd316c50d58062bf8ee1b4bcf3d461Power users and developers can use this API to:
- List their positions
- Track top holders of a market
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
(ns user | |
(:import (java.util.concurrent Executors TimeUnit))) | |
(defn set-timeout [^Callable f ^long ms] | |
(doto (Executors/newScheduledThreadPool 1) | |
(.schedule f ms TimeUnit/MILLISECONDS))) | |
(defn set-interval [^Callable f ^long ms] | |
(doto (Executors/newScheduledThreadPool 1) | |
(.scheduleAtFixedRate f 0 ms TimeUnit/MILLISECONDS))) |
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 java.nio.charset.StandardCharsets; | |
import java.security.PrivateKey; | |
import java.security.Security; | |
import java.security.Signature; | |
import java.util.Base64; | |
import org.bouncycastle.jce.provider.BouncyCastleProvider; | |
import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; | |
import org.bouncycastle.openssl.PEMKeyPair; | |
import org.bouncycastle.openssl.PEMParser; |
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
(ns example.polymarket.sign | |
(:require | |
[cheshire.core :as json] | |
[clojure.string :as str]) | |
(:import | |
(org.web3j.crypto Sign Credentials) ;; org.web3j/crypto "4.12.2" | |
(org.web3j.utils Numeric) | |
(java.util Base64) | |
(javax.crypto Mac) | |
(javax.crypto.spec SecretKeySpec))) |
This is a markdown-formatted mirror of the plaintext style guide here: http://mumble.net/~campbell/scheme/style.txt
Copyright (C) 2007--2011 Taylor R. Campbell
CC BY-NC-SA 3.0
flex-flow: row wrap
shows how inline text alignment is a special case of flexbox:
TEXT-ALIGN: left | center | right | justify | __ | __
→ JUSTIFY-CONTENT: start | middle | end | space-between | space-around | space-evenly
VERTICAL-ALIGN: top | middle | bottom | __
→ ALIGN-SELF: start | center | end | stretch
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
(defmacro =>> | |
"Makes ->> faster if the first form is a collection, and the last form is `sequence`, `into`, or `reduce`" | |
;; adapted from: https://github.com/divs1210/streamer/blob/master/src/streamer/core.clj | |
[coll & xforms-and-term] | |
(let [[xforms term] ((juxt butlast last) xforms-and-term)] | |
(cond | |
;; sequence | |
(or (= term 'sequence) | |
(and (list? term) | |
(= (first term) 'sequence))) |
Extra core-like functions for Clojure:
namespace | popularity | additions |
---|---|---|
medley.core | ★ 740 | 44 |
tupelo.core | ★ 474 | 272 |
taoensso.encore | ★ 240 | 512 |
potpuri.core | ★ 63 | 512 |
NewerOlder