Struct coinnect::kraken::credentials::KrakenCreds [−][src]
pub struct KrakenCreds { /* fields omitted */ }
Methods
impl KrakenCreds
[src]
impl KrakenCreds
pub fn new(name: &str, api_key: &str, api_secret: &str) -> Self
[src]
pub fn new(name: &str, api_key: &str, api_secret: &str) -> Self
Create a new KrakenCreds
from arguments.
pub fn new_from_file(name: &str, path: PathBuf) -> Result<Self>
[src]
pub fn new_from_file(name: &str, path: PathBuf) -> Result<Self>
Create a new KrakenCreds
from a json configuration file. This file must follow this
structure:
{
"account_kraken": {
"exchange" : "kraken",
"api_key" : "123456789ABCDEF",
"api_secret": "ABC&EF?abcdef"
},
"account_bitstamp": {
"exchange" : "bitstamp",
"api_key" : "1234567890ABCDEF1234567890ABCDEF",
"api_secret" : "1234567890ABCDEF1234567890ABCDEF",
"customer_id": "123456"
}
}
For this example, you could use load your Kraken account with
KrakenAPI::new(KrakenCreds::new_from_file("account_kraken", Path::new("/keys.json")))
Trait Implementations
impl Debug for KrakenCreds
[src]
impl Debug for KrakenCreds
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for KrakenCreds
[src]
impl Clone for KrakenCreds
fn clone(&self) -> KrakenCreds
[src]
fn clone(&self) -> KrakenCreds
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Credentials for KrakenCreds
[src]
impl Credentials for KrakenCreds
Auto Trait Implementations
impl Send for KrakenCreds
impl Send for KrakenCreds
impl Sync for KrakenCreds
impl Sync for KrakenCreds