pyEscoAPI 0.0.22__tar.gz → 0.0.23__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/PKG-INFO +1 -1
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/pyEscoAPI/esco_api.py +69 -0
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/pyEscoAPI.egg-info/PKG-INFO +1 -1
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/pyproject.toml +1 -1
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/tests/test_client.py +19 -0
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/README.md +0 -0
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/pyEscoAPI/__init__.py +0 -0
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/pyEscoAPI/dataclasses.py +0 -0
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/pyEscoAPI/exception.py +0 -0
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/pyEscoAPI.egg-info/SOURCES.txt +0 -0
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/pyEscoAPI.egg-info/dependency_links.txt +0 -0
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/pyEscoAPI.egg-info/requires.txt +0 -0
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/pyEscoAPI.egg-info/top_level.txt +0 -0
- {pyescoapi-0.0.22 → pyescoapi-0.0.23}/setup.cfg +0 -0
|
@@ -794,6 +794,75 @@ class EscoAPI:
|
|
|
794
794
|
request_method=HTTPMethod.POST
|
|
795
795
|
)
|
|
796
796
|
|
|
797
|
+
def insert_oferta_orden(
|
|
798
|
+
self,
|
|
799
|
+
cod_orden: int,
|
|
800
|
+
cantidad: float,
|
|
801
|
+
precio: float,
|
|
802
|
+
fecha: date | None = None,
|
|
803
|
+
):
|
|
804
|
+
"""
|
|
805
|
+
Inserta una oferta para una orden determinada.
|
|
806
|
+
|
|
807
|
+
Args:
|
|
808
|
+
cod_orden (int): Código interno de la orden.
|
|
809
|
+
cantidad (float): Cantidad ofertada.
|
|
810
|
+
precio (float): Precio ofertado.
|
|
811
|
+
fecha (date | None, optional): Fecha de la oferta. Defaults: fecha del dia en tiempo de ejecucion.
|
|
812
|
+
|
|
813
|
+
Returns:
|
|
814
|
+
dict: Diccionario con cod_operacion
|
|
815
|
+
"""
|
|
816
|
+
req_body = {
|
|
817
|
+
"codOrden": cod_orden,
|
|
818
|
+
"cantidad": cantidad,
|
|
819
|
+
"precio": precio,
|
|
820
|
+
"fecha": fecha.isoformat() if fecha is not None else date.today().isoformat()
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
self.__pre_connection()
|
|
824
|
+
return self.__make_request(
|
|
825
|
+
request_endpoint="/insert-oferta-orden",
|
|
826
|
+
request_body=req_body,
|
|
827
|
+
request_method=HTTPMethod.POST
|
|
828
|
+
)
|
|
829
|
+
|
|
830
|
+
def insert_ejecucion_orden(
|
|
831
|
+
self,
|
|
832
|
+
cod_orden: int,
|
|
833
|
+
cantidad: float,
|
|
834
|
+
precio: float,
|
|
835
|
+
fecha: date | None = None,
|
|
836
|
+
num_ejecucion: int | None = None
|
|
837
|
+
):
|
|
838
|
+
"""
|
|
839
|
+
Inserta una ejecucion de una orden determinada.
|
|
840
|
+
|
|
841
|
+
Args:
|
|
842
|
+
cod_orden (int): Código interno de la orden.
|
|
843
|
+
cantidad (float): Cantidad ofertada.
|
|
844
|
+
precio (float): Precio ofertado.
|
|
845
|
+
fecha (date | None, optional): Fecha de la oferta. Defaults: fecha del dia en tiempo de ejecucion.
|
|
846
|
+
num_ejecucion (int | None, optional): Número de Ejecución. Default None.
|
|
847
|
+
|
|
848
|
+
Returns:
|
|
849
|
+
dict: Diccionario con cod_operacion
|
|
850
|
+
"""
|
|
851
|
+
req_body = {
|
|
852
|
+
"codOrden": cod_orden,
|
|
853
|
+
"cantidad": cantidad,
|
|
854
|
+
"precio": precio,
|
|
855
|
+
"fecha": fecha.isoformat() if fecha is not None else date.today().isoformat(),
|
|
856
|
+
"numEjecucion": num_ejecucion
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
self.__pre_connection()
|
|
860
|
+
return self.__make_request(
|
|
861
|
+
request_endpoint="/insert-ejecucion-orden",
|
|
862
|
+
request_body=req_body,
|
|
863
|
+
request_method=HTTPMethod.POST
|
|
864
|
+
)
|
|
865
|
+
|
|
797
866
|
def insert_orden_venta(
|
|
798
867
|
self,
|
|
799
868
|
instrumento_abreviatura: str,
|
|
@@ -292,3 +292,22 @@ def test_get_domicilio_cuenta_comitente(api_client):
|
|
|
292
292
|
cod_tp_domicilio="PA"
|
|
293
293
|
)
|
|
294
294
|
assert "codTpDomicilio" in result
|
|
295
|
+
|
|
296
|
+
def test_insert_oferta_orden(api_client):
|
|
297
|
+
result = api_client.insert_oferta_orden(
|
|
298
|
+
cod_orden = 178957,
|
|
299
|
+
fecha = datetime.fromisoformat("2024-04-27"),
|
|
300
|
+
cantidad = 10,
|
|
301
|
+
precio = 100
|
|
302
|
+
)
|
|
303
|
+
assert "codOperacion" in result
|
|
304
|
+
|
|
305
|
+
def test_insert_ejecucion_orden(api_client):
|
|
306
|
+
result = api_client.insert_ejecucion_orden(
|
|
307
|
+
cod_orden = 178957,
|
|
308
|
+
fecha = datetime.fromisoformat("2024-04-27"),
|
|
309
|
+
cantidad = 10,
|
|
310
|
+
precio = 100,
|
|
311
|
+
num_ejecucion=1
|
|
312
|
+
)
|
|
313
|
+
assert "codOperacion" in result
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|