Method: Bitmex.headers
- Defined in:
- lib/bitmex.rb
.headers(api_key, api_secret, verb, path, body, query) ⇒ Object
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/bitmex.rb', line 43 def self.headers(api_key, api_secret, verb, path, body, query) return {} unless api_key || api_secret expires = Time.now.utc.to_i + 60 { 'api-expires' => expires.to_s, 'api-key' => api_key, 'api-signature' => Bitmex.signature(api_secret, verb, path, expires, body, query) } end |