Giter Site home page Giter Site logo

gdaxswift's Introduction

GDAXSwift

Version License Platform

Features

  • Lightweight, minimal codebase
  • Sandbox support
  • Automatic request signing when calling any of the private endpoints
  • All networking and JSON parsing handled internally
  • Request/response object models
  • Easy to handle, callback based response handling

While this library does the majority of the heavy lifting for you it is still recommended to read over the official GDAX documentation.

Requirements

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 8.1+
  • Swift 3.0+

Installation

GDAXSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "GDAXSwift"

Usage

Create an instance of GDAXClient using any of the available initializers. You may then use the public and private instance properties to access the public and private endpoints, respectivly.

Note that an error will be thrown if you attempt to access any of the private endpoints without supplying an API key, base64 encoded secret and passphrase.

let gdaxClient = GDAXClient(apiKey: "API key", secret64: "base64 encoded secret", passphrase: "passphrase", isSandbox: false)

// Multiple convenience initializers exist
// For example, if only querying public data on the live exchange, a new client may be constructed as GDAXClient()

// public (no authentication required)
gdaxClient.public.getProducts({ (products, response, error) in
	print("Response: \(products as Any)")
	print("Error: \(error as Any)")
})

// private (authentication required)
gdaxClient.private.getAccounts({ (accounts, response, error) in
	print("Response: \(accounts as Any)")
	print("Error: \(error as Any)")
})

TODO

  • Finish implementing all private endpoints
  • Support for the Websocket Feed
  • Documentation

Changelog

See the CHANGELOG file.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Author

Anthony Puppo, [email protected]

License

GDAXSwift is available under the MIT license. See the LICENSE file for more info.

Donations

  • Bitcoin: 1HTrooe1AsQUPkPrrCC39BZbX8K6qnUJFV
  • Ethereum: 0x7117A29cb2F425405D0DF1961fc4d7BF3e526b6b

gdaxswift's People

Contributors

apuppo avatar anthonypuppo avatar

Watchers

&apos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.