srakapeople.blogg.se

Cryptoedit
Cryptoedit











cryptoedit

Using the timestamp of the last result as the offset will give you the next page of results. This is the offset at which to start the results. Offset – The timestamp offset, used for pagination. To_symbol – The “to” symbol of the forex currency pair.ĭate – The date/day of the historic ticks to retrieve. Get historic trade ticks for a forex currency pair.įrom_symbol – The “from” symbol of the forex currency pair. get_historic_forex_ticks ( from_symbol : str, to_symbol : str, date, offset : Optional ] = None, limit : int = 500, raw_response : bool = False ) Make raw_response=True to get underlying response object Get Historic forex ticks  SyncForexClient. Defaults to False which returns the json decodedĪ JSON decoded Dictionary by default. Useful for when you need to say check the Raw_response – Whether or not to return the Response Object. Defaults to 2 which is 2 decimal places accuracy. Precision – The decimal precision of the conversion. Note than you can convert in both directions.įrom_symbol – The “from” symbol of the pair. Get currency conversions using the latest market conversion rates. real_time_currency_conversion ( from_symbol : str, to_symbol : str, amount : float, precision : int = 2, raw_response : bool = False ) Real Time currency conversion  SyncForexClient. Async methods will need to be awaited, see Async Support for REST endpoints. You’d call the methods as client.get_historic_forex_ticks and so on. To use any of the below method, simply call it on the client you created above. Raises a WriteTimeout if unable to connect within the basically the number of seconds to wait forĭata to be written/posted. Write_timeout – The write timeout in seconds. Defaults to no limit.ĭo NOT change if you’re unsure of the applications. Max_keepalive – max number of allowable keep alive connections in the pool. Max_connections – Max number of connections in the pool. Do NOT change if you’re unsure of what it Trying to get a connection from connection pool. Basically the number of seconds to wait while Pool_timeout – The pool timeout in seconds.

cryptoedit

Raises a ReadTimeout if unable to connect within the specified basically the number of seconds to wait forĭate to be received. Read_timeout – The read timeout in seconds. Defaults to usual non-async client.Ĭonnect_timeout – The connection timeout in seconds. Use_async – Set it to True to get async client. Initiates a Client to be used to access all REST Forex endpoints. ForexClient ( api_key : str, use_async : bool = False, connect_timeout : int = 10, read_timeout : int = 10, pool_timeout : int = 10, max_connections : Optional = None, max_keepalive : Optional = None, write_timeout : int = 10 )  Here is how the client initializer looks like: _api. See the relevant method’s docs for more information on what the parameters expect. but the library allows you to specify the symbol with or without the prefix. In those methods, the symbol is expected to have a prefix C: before the currency symbol names. An example would be the get_aggregates_bars method. However a few endpoints require you to supply them as one combined symbol. Note that most endpoints require you to specify the currency pairs as separate symbols (a from_symbol and a to_symbol). ForexClient ( 'KEY', True ) # for an async client ForexClient ( 'KEY' ) # for usual sync client async_forex_client = polygon.













Cryptoedit