Skip to content

Commit 7879b72

Browse files
committed
First commit.
0 parents  commit 7879b72

23 files changed

+1550
-0
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
_build
2+
tmp
3+
*~
4+
\.\#*
5+
\#*#
6+
*.install
7+
*.native
8+
*.byte

.merlin

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PKG bytes
2+
S src
3+
S test
4+
B _build/**

.ocp-indent

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
strict_with=always,match_clause=4,strict_else=never

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
vX.Y.Z YYYY-MM-DD Location
2+
--------------------------
3+
4+
First release.

LICENSE.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2016 Vincent Bernardoff
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted, provided that the above
5+
copyright notice and this permission notice appear in all copies.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
all:
2+
./build lib-byte
3+
4+
clean:
5+
./build clean

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
bs_api — APIs to some bitcoin exchanges
2+
-------------------------------------------------------------------------------
3+
%%VERSION%%
4+
5+
bs_api is TODO
6+
7+
bs_api is distributed under the ISC license.
8+
9+
Homepage: https://github.com/vbmithr/bs_api
10+
Contact: Vincent Bernardoff `<[email protected]>`
11+
12+
## Installation
13+
14+
bs_api can be installed with `opam`:
15+
16+
opam install bs_api
17+
18+
If you don't use `opam` consult the [`opam`](opam) file for build
19+
instructions.
20+
21+
## Documentation
22+
23+
The documentation and API reference is automatically generated by
24+
`ocamldoc` from the interfaces. It can be consulted [online][doc]
25+
and there is a generated version in the `doc` directory of the
26+
distribution.
27+
28+
[doc]: https://vbmithr.github.io/bs_api/doc
29+
30+
## Sample programs
31+
32+
If you installed bs_api with `opam` sample programs are located in
33+
the directory `opam config var bs_api:doc`.
34+
35+
In the distribution sample programs and tests are located in the
36+
[`test`](test) directory of the distribution. They can be built with:
37+
38+
ocamlbuild -use-ocamlfind test/tests.otarget
39+
40+
The resulting binaries are in `_build/test`.
41+
42+
- `test.native` tests the library, nothing should fail.

_tags

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
true : bin_annot, safe_string, package(bytes), warn(-40)
2+
3+
<src> : include
4+
<test> : include
5+
6+
<*/*>: package(core), \
7+
package(async), \
8+
package(bs_devkit), \
9+
package(nocrypto), \
10+
package(hex), \
11+
package(dtc), \
12+
package(cohttp.async), \
13+
package(websocket.async), \
14+
package(wamp), \
15+
thread

build

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
# This script is only used for developement. It is removed by the
3+
# distribution process.
4+
5+
set -e
6+
7+
OCAMLBUILD=${OCAMLBUILD:="ocamlbuild -use-ocamlfind -classic-display \
8+
-tag debug"}
9+
10+
action ()
11+
{
12+
case $1 in
13+
default) action lib-native ;;
14+
lib-byte) $OCAMLBUILD bs_api.cma ;;
15+
lib-native) $OCAMLBUILD bs_api.cmxa ;;
16+
test|tests) $OCAMLBUILD test/tests.otarget ;;
17+
doc) shift; topkg doc --dev $* ;;
18+
api-doc) shift; topkg doc $* ;;
19+
clean) $OCAMLBUILD -clean ;;
20+
*) $OCAMLBUILD $* ;;
21+
esac
22+
}
23+
24+
if [ $# -eq 0 ];
25+
then action default ;
26+
else action $*; fi

doc/api.odocl

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bs_api

doc/dev.odocl

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bs_api

doc/style.css

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/* Copyright (c) 2016 Daniel C. Bünzli. All rights reserved.
2+
Distributed under the ISC license, see terms at the end of the file. */
3+
4+
/* Reset a few things. */
5+
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,
6+
a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,
7+
small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,
8+
form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td
9+
{ margin: 0; padding: 0; border: 0 none; outline: 0; font-size: 100%;
10+
font-weight: inherit; font-style:inherit; font-family:inherit;
11+
line-height: inherit; vertical-align: baseline; text-align:inherit;
12+
color:inherit; background: transparent; }
13+
14+
table { border-collapse: collapse; border-spacing: 0; }
15+
16+
/* Basic page layout */
17+
18+
body { font: normal 10pt/1.375em helvetica, arial, sans-serif; text-align:left;
19+
margin: 1.375em 10%; min-width: 40ex; max-width: 72ex;
20+
color: black; background: transparent /* url(line-height-22.gif) */; }
21+
22+
b { font-weight: bold }
23+
em { font-style: italic }
24+
25+
tt, code, pre { font-family: WorkAroundWebKitAndMozilla, monospace;
26+
font-size: 1em; }
27+
pre code { font-size : inherit; }
28+
.codepre { margin-bottom:1.375em /* after code example we introduce space. */ }
29+
30+
.superscript,.subscript
31+
{ font-size : 0.813em; line-height:0; margin-left:0.4ex;}
32+
.superscript { vertical-align: super; }
33+
.subscript { vertical-align: sub; }
34+
35+
/* ocamldoc markup workaround hacks */
36+
37+
hr, hr + br, div + br, center + br, span + br, ul + br, ol + br, pre + br
38+
{ display: none } /* annoying */
39+
40+
div.info + br { display:block}
41+
42+
.codepre br + br { display: none }
43+
h1 + pre { margin-bottom:1.375em} /* Toplevel module description */
44+
45+
/* Sections and document divisions */
46+
47+
/* .navbar { margin-bottom: -1.375em } */
48+
h1 { font-weight: bold; font-size: 1.5em; /* margin-top:1.833em; */
49+
margin-top:0.917em; padding-top:0.875em;
50+
border-top-style:solid; border-width:1px; border-color:#AAA; }
51+
h2 { font-weight: bold; font-size: 1.313em; margin-top: 1.048em }
52+
h3 { font-weight: bold; font-size: 1.125em; margin-top: 1.222em }
53+
h3 { font-weight: bold; font-size: 1em; margin-top: 1.375em}
54+
h4 { font-style: italic; }
55+
56+
/* Used by OCaml's own library documentation. */
57+
h6 { font-weight: bold; font-size: 1.125em; margin-top: 1.222em }
58+
.h7 { font-weight: bold; font-size: 1em; margin-top: 1.375em }
59+
60+
p { margin-top: 1.375em }
61+
pre { margin-top: 1.375em }
62+
.info { margin: 0.458em 0em -0.458em 2em;}/* Description of types values etc. */
63+
td .info { margin:0; padding:0; margin-left: 2em;} /* Description in indexes */
64+
65+
ul, ol { margin-top:0.688em; padding-bottom:0.687em;
66+
list-style-position:outside}
67+
ul + p, ol + p { margin-top: 0em }
68+
ul { list-style-type: square }
69+
70+
71+
/* h2 + ul, h3 + ul, p + ul { } */
72+
ul > li { margin-left: 1.375em; }
73+
ol > li { margin-left: 1.7em; }
74+
/* Links */
75+
76+
a, a:link, a:visited, a:active, a:hover { color : #00B; text-decoration: none }
77+
a:hover { text-decoration : underline }
78+
*:target {background-color: #FFFF99;} /* anchor highlight */
79+
80+
/* Code */
81+
82+
.keyword { font-weight: bold; }
83+
.comment { color : red }
84+
.constructor { color : green }
85+
.string { color : brown }
86+
.warning { color : red ; font-weight : bold }
87+
88+
/* Functors */
89+
90+
.paramstable { border-style : hidden ; padding-bottom:1.375em}
91+
.paramstable code { margin-left: 1ex; margin-right: 1ex }
92+
.sig_block {margin-left: 1em}
93+
94+
/* Images */
95+
96+
img { margin-top: 1.375em }
97+
98+
/*---------------------------------------------------------------------------
99+
Copyright (c) 2016 Daniel C. Bünzli
100+
101+
Permission to use, copy, modify, and/or distribute this software for any
102+
purpose with or without fee is hereby granted, provided that the above
103+
copyright notice and this permission notice appear in all copies.
104+
105+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
106+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
107+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
108+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
109+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
110+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
111+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
112+
---------------------------------------------------------------------------*/

opam

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
opam-version: "1.2"
2+
maintainer: "Vincent Bernardoff <[email protected]>"
3+
authors: ["Vincent Bernardoff <[email protected]>"]
4+
homepage: "https://github.com/vbmithr/bs_api"
5+
doc: "https://vbmithr.github.io/bs_api/doc"
6+
license: "ISC"
7+
dev-repo: "https://github.com/vbmithr/bs_api.git"
8+
bug-reports: "https://github.com/vbmithr/bs_api/issues"
9+
tags: []
10+
available: [ ocaml-version >= "4.01.0"]
11+
depends: [
12+
"ocamlfind" {build}
13+
"ocamlbuild" {build}
14+
"topkg" {build}
15+
]
16+
depopts: []
17+
build:
18+
[[ "ocaml" "pkg/pkg.ml" "build"
19+
"--pinned" "%{pinned}%" ]]

pkg/META

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
description = "APIs to some bitcoin exchanges"
2+
version = "%%VERSION%%"
3+
requires = "core async bs_devkit nocrypto hex dtc cohttp.async websocket.async wamp"
4+
archive(byte) = "bitmex_api.cma bfx_api.cma poloniex_api.cma bs_api.cma"
5+
archive(native) = "bitmex_api.cmxa bfx_api.cmxa poloniex_api.cmxa bs_api.cmxa"
6+
plugin(byte) = "bitmex_api.cma bfx_api.cma poloniex_api.cma bs_api.cma"
7+
plugin(native) = "bitmex_api.cmxs bfx_api.cmxs poloniex_api.cmxs bs_api.cmxs"

pkg/pkg.ml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env ocaml
2+
#use "topfind"
3+
#require "topkg"
4+
open Topkg
5+
6+
let () =
7+
Pkg.describe "bs_api" @@ fun c ->
8+
Ok [
9+
Pkg.lib ~exts:Exts.library "src/bitmex_api";
10+
Pkg.lib ~exts:Exts.library "src/bfx_api";
11+
Pkg.lib ~exts:Exts.library "src/poloniex_api";
12+
Pkg.mllib "src/bs_api.mllib"
13+
]

0 commit comments

Comments
 (0)