An open API service indexing awesome lists of open source software.

https://github.com/ismaelvsqz/cexio

Unofficial CEX.IO Rest API Go Client.
https://github.com/ismaelvsqz/cexio

cexio go golang rest-api

Last synced: 17 days ago
JSON representation

Unofficial CEX.IO Rest API Go Client.

Awesome Lists containing this project

README

          

# Unofficial CEX.IO Rest API Go Client.

This library simplifies the CEX.IO Rest API consumption.

# Example

The following example shows two calls. One is private and the other is public.

package main

import (
"fmt"

"github.com/ismaelvsqz/cexio"
)

func main() {
api := cexio.API{
Username: "up00000001",
APIKey: "XXXXXXXXXXXXX",
APISecret: "YYYYYYYYYYYYY"}

resp, err := api.Do(cexio.Request{
Method: cexio.MethodActiveOrdersStatus,
Data: map[string]interface{}{"orders_list": []string{"111111111", "22222222222"}},
})

if err != nil {
log.Fatal(err)
}

fmt.Printf("%s\n", resp)

resp, err = api.Do(cexio.Request{
Method: cexio.MethodTicker,
Parameters: []string{"BTC", "USD"},
})

if err != nil {
log.Fatal(err)
}

fmt.Printf("%s\n", resp)
}

# License

Copyright 2021 Juan Ismael Vasquez . All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.