npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

circle-api

v0.1.0

Published

A nodejs module for interacting with the Circle API

Readme

circle-api

##About

###Description A nodejs module for interacting with the Circle API.

Donations welcomed at: 1CniXdfgpAbM3pYbbLvooRZAGhTEpTMjkN

![1CniXdfgpAbM3pYbbLvooRZAGhTEpTMjkN] (http://chart.apis.google.com/chart?chs=250x250&cht=qr&chld=|1&chl=bitcoin%3A1CniXdfgpAbM3pYbbLvooRZAGhTEpTMjkN)

###Author Norman Joyner - [email protected]

##Getting Started

###Installation npm install circle-api

###Configuration Simply require the circle-api module, instantiate a new Circle-Api object, configure it if necessary, and start making calls. The mfa secret and api version are configurable. Your Circle account must be set up to use Google Authenticator, rather than text messaged based MFA.

New Circle-Api objects can be instantiated with configuration parameters. Here is an example:

var CircleApi = require("circle-api");
var circle_api = new CircleApi({
    api_version: "v2",
    mfa_secret: "NVTGCX3TMVRXEZLU"
});

Circle-Api objects can also be configured via the .configure(options) method. Here is an exmaple:

var CirlceApi = require("circle-api");
var circle_api = new CircleApi();

var options = {
    mfa_secret: "NVTGCX3TMVRXEZLU"
}

circle_api.configure(options);

####Options api_version - [optional, defaults to "v2"] version of the API to use

mfa_secret - [required] totp secret

####Finding MFA Secret Before scanning the Google Authenticator code with your application of choice, first scan the QR code with a QR code app. View the url the QR contains and you will see something similar to: otpauth://totp/Circle%3Ayour%40email.com?secret=NVTGCX3TMVRXEZLU&issuer=Circle

Take notice to what 'secret' is equal to in the url and use this as the mfa_secret.

###Supported API versions

  • v2

###Supported API Methods

  • Logging In - circle_api.login(options, fn)
  • Getting Account Information - circle_api.get_account(fn)
  • Getting Activities - cirlce_api.get_activities(fn)
  • Getting History - cirlce_api.get_history(fn)
  • Getting Bitcoin Address - circle_api.get_address(fn)
  • Getting Personal Information - circle_api.get_personal_information(fn)
  • Getting Fiat Accounts - circle_api.get_fiat_accounts(fn)
  • Depositing Money - circle_api.deposit(options, fn)
  • Sending Money - circle_api.send(options, fn)
  • Requesting Money - circle_api.request(options, fn)

###Examples Before making future API calls, you must first login:

circle_api.login({email: "[email protected]", password: "yourpassword"}, function(err){
    if(err)
        throw err;
});

Once logged in you can make additional calls.

Fetch account information, and print response:

circle_api.get_account(function(err, account_info){
    if(err)
        throw err;

    console.log(account_info);
});

Fetch account activities, and print response:

circle_api.get_activities(function(err, activities){
    if(err)
        throw err;

    console.log(activities);
});

Fetch account activities, and print response:

circle_api.get_activities(function(err, activities){
    if(err)
        throw err;

    console.log(activities);
});

Fetch account history, and print response:

circle_api.get_history(function(err, history){
    if(err)
        throw err;

    console.log(history);
});

Get bitcoin address, and print response:

circle_api.get_address(function(err, address){
    if(err)
        throw err;

    console.log(address);
});

Get personal information, and print response:

circle_api.get_personal_information(function(err, pii){
    if(err)
        throw err;

    console.log(pii);
});

Get fiat accounts, and print response:

circle_api.get_fiat_accounts(function(err, accounts){
    if(err)
        throw err;

    console.log(accounts);
});

Deposit $1 from fiat account, and print response:

circle_api.deposit({"fiat_address": "fiat-account-address", amount: 1.0}, function(err, response){
    if(err)
        throw err;

    console.log(response);
});

Send $1 to bitcoin address (or email address), and print response:

circle_api.send({"address": "1CniXdfgpAbM3pYbbLvooRZAGhTEpTMjkN", amount: 1.0}, function(err, response){
    if(err)
        throw err;

    console.log(response);
});

Request $1 from email address, and print response:

circle_api.request({"email": "[email protected]", amount: 1.0}, function(err, response){
    if(err)
        throw err;

    console.log(response);
});